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