#include <bits/stdc++.h>
using namespace std;
int main() {
  unsigned long n, f = 0, i = 0;
  cin >> n;
  f = n / 36;
  n %= 36;
  if (n % 3 == 1 || n % 3 == 0)
    i = n / 3;
  else {
    if (n / 3 + 1 == 12)
      f = 1;
    else
      i = n / 3 + 1;
  }
  cout << f << ' ' << i;
  return 0;
}
