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