#include <bits/stdc++.h>
int main() {
  int x, inch, feet, round;
  scanf("%d", &x);
  inch = x / 3;
  round = x % 3;
  if (round == 2) inch = inch + 1;
  feet = inch / 12;
  inch = inch % 12;
  printf("%d %d", feet, inch);
}
