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