#include <bits/stdc++.h>
int main() {
  int n;
  scanf("%d", &n);
  int feet, inch, paris, berlin;
  berlin = n % 3;
  if (berlin == 2)
    paris = n / 3 + 1;
  else
    paris = n / 3;
  feet = paris / 12;
  inch = paris % 12;
  printf("%d %d", feet, inch);
  return 0;
}
