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