#include <bits/stdc++.h>
using namespace std;
FILE *in, *out;
int N, a, b;
int main() {
  in = stdin;
  out = stdout;
  fscanf(in, "%d", &N);
  a = N / 36;
  N = N % 36;
  b = N / 3;
  N = N % 3;
  if (N > 1) b++;
  if (b > 11) a += b / 12;
  b %= 12;
  fprintf(out, "%d %d\n", a, b);
}
