#include <bits/stdc++.h>
using namespace std;
int main() {
  freopen("125A.inp", "r", stdin);
  freopen("125A.out", "w", stdout);
  long int n, a, b, q, p;
  scanf("%ld", &n);
  if ((n > 0) && (n < 10001)) {
    a = n / 36;
    q = n - a * 36;
    b = q / 3;
    p = q - b * 3;
    if (p == 2)
      printf("%ld %ld", a, b + 1);
    else if ((p == 1) || (p == 0))
      printf("%ld %ld", a, b);
  } else
    return 0;
}
