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