#include <bits/stdc++.h>
using namespace std;
int main() {
  int i, a, b, n;
  scanf("%d", &n);
  b = n / 3;
  n %= 3;
  if (n == 2) b++;
  a = b / 12;
  b %= 12;
  printf("%d %d\n", a, b);
  return 0;
}
