#include <bits/stdc++.h>
int main(void) {
  int n;
  scanf("%d", &n);
  int foot;
  int inch;
  foot = n / 36;
  inch = n % 36;
  int s = inch % 3;
  inch = inch / 3;
  if (s == 2) inch++;
  printf("%d %d\n", foot, inch);
  return 0;
}
