#include <bits/stdc++.h>
int n, feet, inch;
double cmp, base1 = 36, base2 = 3, tmp;
int main() {
  while (scanf("%d", &n) != EOF) {
    feet = round(n / base1);
    tmp = n - feet * base1;
    inch = round(tmp / base2);
    printf("%d %d\n", feet, inch);
  }
  return 0;
}
