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