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