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