#include <bits/stdc++.h>
int main() {
  long long int num, a, b, c;
  scanf("%lld", &num);
  a = num / 36;
  if (num % 36 == 35) a++;
  b = num - (a * 36);
  c = b / 3;
  if (b % 3 == 2) {
    c++;
  } else
    c = c;
  printf("%lld %lld\n", a, c);
}
