#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int ft = n / 36;
  int rem = n - ft * 36;
  int in = rem / 3;
  if (rem % 3 < 2)
    cout << ft << " " << in << endl;
  else
    cout << ft << " " << (in + 1) << endl;
}
