#include <bits/stdc++.h>
using namespace std;
int a, b, n;
int main() {
  cin >> n;
  a = n / 36;
  n %= 36;
  if (n == 35) a++, n = 0;
  b = n / 3;
  n %= 3;
  if (n == 2) b++;
  cout << a << " " << b;
}
