#include <bits/stdc++.h>
int main() {
  int x;
  double feet, inch, cm;
  scanf("%lf", &cm);
  inch = cm / 3.0;
  x = inch;
  if (int((inch - x) * 10.0) >= 5) inch = (int)inch + 1;
  feet = inch / (12.0);
  inch = inch - ((int)feet * 12);
  printf("%d %.0lf\n", (int)feet, inch);
  return 0;
}
