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