#include <bits/stdc++.h>
using namespace std;
long long k, i, j, n, w, a[111111], q, r, t;
string s;
using namespace std;
int main() {
  cin >> n;
  if (n >= 36) {
    k = n / 36;
    n -= k * 36;
  }
  r = n / 3;
  n -= r * 3;
  if (n == 2) r++;
  cout << k << " " << r;
  return 0;
}
