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