#include <bits/stdc++.h>
int main() {
  double feet, inch, cm;
  scanf("%lf", &cm);
  inch = cm / 3.0;
  if (int((inch - int(inch)) * 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;
}
