#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  if (n % 3 != 0) {
    if (n % 3 == 2)
      n += 3 - n % 3;
    else
      n -= n % 3;
  }
  n /= 3;
  cout << n / 12 << " " << n % 12 << endl;
  return 0;
}
