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