#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a, b;
  float y, z;
  cin >> n;
  if ((1 <= n) && (n <= 10000)) {
    int x = n / 3;
    a = x / 12;
    cout << a;
    b = x % 12;
    y = n / 3.0;
    z = y - x;
    if (z != 0) {
      b = b + 1;
      cout << " " << b << endl;
    } else
      cout << " " << b << endl;
  }
  return 0;
}
