#include <bits/stdc++.h>
#pragma warning(disable : 4786)
using namespace std;
int main() {
  int n, i = 0, p;
  cin >> n;
  p = (n + 1) / 3;
  while (p > -1) {
    p = p - 12;
    i++;
  }
  p = p + 12;
  cout << i - 1 << ' ' << p << endl;
  return 0;
}
