#include <bits/stdc++.h>
using namespace std;
long int a, b, c, s;
int main() {
  cin >> a;
  c = 0;
  if (a % 3 == 2) {
    c = c + 1;
  }
  s = a / 3 + c;
  b = 0;
  b = (s - s % 12) / 12;
  s = s % 12;
  cout << b << " " << s;
  return 0;
}
