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