#include <bits/stdc++.h>
using namespace std;
const int inf = (int)(1e9);
const int mod = inf + 7;
const double pi = acos(-1.0);
const double eps = 1e-9;
int n;
int main() {
  cin >> n;
  int a, b;
  n += 1;
  n /= 3;
  b = n % 12;
  a = (n - b) / 12;
  cout << a << " " << b;
  return 0;
}
