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