#include <bits/stdc++.h>
int main() {
  int m1 = 36, m2 = 3, n, a, b;
  while (scanf("%d", &n) + 1) {
    a = n / m1;
    n = n % m1;
    if (n % m2 == 1)
      b = n / m2;
    else
      b = (n + m2 - 1) / m2;
    printf("%d %d\n", a, b);
  }
}
