#include <bits/stdc++.h>
using namespace std;
int main() {
  int cm;
  cin >> cm;
  int ft = 36;
  int inch = 3;
  int a, b;
  a = cm / ft;
  if (cm + 1 == ft) {
    a = 1;
    b = 0;
  }
  if (cm + 2 == ft) {
    a = 1;
    b = 1;
  }
  cm = cm - (a * ft);
  int rem = cm % inch;
  b = cm / inch;
  if (rem == 2) {
    b = b + 1;
  }
  cout << a << " " << b;
}
