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