#include <bits/stdc++.h>
using namespace std;
int dx[] = {0, 0, 1, -1, 1, 1, -1, -1};
int dy[] = {1, -1, 0, 0, 1, -1, 1, -1};
int main() {
  int x;
  cin >> x;
  if (x % 3 == 2) x += 2;
  int z = x / 36;
  int xx = x - z * 36;
  int g = xx / 3;
  cout << z << " " << g << endl;
  return 0;
}
