#include <bits/stdc++.h>
using namespace std;
priority_queue<long long, vector<long long>, less<long long> > q;
char nm[100005];
int main() {
  long long a, b, c, d, i, j, k, l;
  long long n;
  while (~scanf("%lld", &n)) {
    c = n / 36;
    d = n % 36;
    a = d / 3;
    b = d % 3;
    if (b > 1) a += 1;
    if (a == 12) {
      a = 0;
      c += 1;
    }
    printf("%lld %lld\n", c, a);
  }
}
