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