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