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