#include <bits/stdc++.h>
using namespace std;
ifstream Cin("input.txt");
ofstream Cout("output.txt");
int main() {
  long long n, a, b;
  cin >> n;
  a = n / 36;
  b = n % 36;
  if (b % 3 == 2)
    b = b / 3 + 1;
  else
    b = b / 3;
  if (b == 12) b = 0, a++;
  cout << a << " " << b;
}
