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