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