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