#include <bits/stdc++.h>
int main() {
  int n, r, f, i;
  scanf("%d", &n);
  r = n / 3;
  n %= 3;
  f = r / 12;
  r %= 12;
  if (n < 2)
    n = 0;
  else if (n > 1)
    n = 1;
  i = r + n;
  printf("%d %d", f, i);
}
