#include <cstdio>
#include <cmath>
#include <cstring>
#include <cstdlib>
#include <ctime>
#include <cassert>
#include <algorithm>
#include <iostream>
#include <vector>
#include <set>
#include <map>
#include <string>
#include <queue>

using namespace std;

typedef long long ll;

#define pb push_back
#define sz(a) (int)a.size()
#define zero(a) memset (a, 0, sizeof(a))
#define mp make_pair

#define taskname "hotel"

int main (void)
{
  freopen (taskname".in", "r", stdin);
  freopen (taskname".out", "w", stdout);
  int n;
  assert(cin >> n);
  assert( 2 <= n && n <= 100);
  for (int i = 0; ; i++)
  	if ((n - 2*i)%3 == 0){
  		cout << i <<" "<<(n-2*i)/3 << endl;
  		return 0;
  	}
  assert(false);
  return 0;
}

