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