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