#include <bits/stdc++.h>
int main() {
  int n;
  while (~scanf("%d", &n)) {
    int a = n / 36;
    int m = n % 36;
    int b = m / 3;
    int c = m % 3;
    if (c > 1) b++;
    if (b >= 12) a++, b = 0;
    printf("%d %d\n", a, b);
  }
  return 0;
}
