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