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