#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int m = n / 36;
  int q = (n % 36) / 3;
  int mo = (n % 36) % 3;
  if (mo == 2) q += 1;
  cout << m << " " << q << endl;
}
