#include <bits/stdc++.h>
int main() {
  int i, j;
  long long int a, b;
  scanf("%lld", &a);
  b = round((double)a / 36);
  a = round((double)(a - b * 36) / 3);
  printf("%lld %lld\n", b, a);
  return 0;
}
