#include <bits/stdc++.h>
using namespace std;
long long n, m, k, res, ans;
int main() {
  cin >> n;
  res = n / 36;
  m = n % 36;
  k = m / 3;
  if (m % 3 == 1 || m % 3 == 0) {
    ans = k;
  } else {
    ans = k + 1;
  }
  if (ans == 12) {
    cout << res + 1 << " " << 0;
    return 0;
  }
  cout << res << " " << ans;
}
