#include <bits/stdc++.h>
int main() {
  int x, y, z;
  scanf("%d", &x);
  z = (x / 36);
  y = (x - (z * 36)) / 3;
  if (x - 3 == 2 || x == 2 || x % 3 == 2) {
    y = y + 1;
    if (y == 12) {
      y = 0;
      z = 1;
      if (y == 35 || x == 71) {
        y = 0;
        z = 2;
        printf("%d %d", z, y);
      } else
        printf("%d %d", z, y);
    } else
      printf("%d %d", z, y);
  } else if (y == 12) {
    y = 0;
    z = 1;
    printf("%d %d", z, y);
  } else
    printf("%d %d", z, y);
}
