#include <bits/stdc++.h>
int main() {
  int n;
  scanf("%d", &n);
  int feet, inches, remain;
  feet = n / 36;
  remain = n - feet * 36;
  if (remain % 3 == 0)
    inches = remain / 3;
  else if (remain % 3 == 1)
    inches = remain / 3;
  else
    inches = remain / 3 + 1;
  printf("%d %d", feet, inches);
  return 0;
}
