#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, a1, b1;
  cin >> a;
  a1 = a / 36;
  a -= a1 * 36;
  if (a == 35) {
    cout << 1 << " " << 0;
    return 0;
  }
  b1 = a / 3;
  a -= b1 * 3;
  if (a >= 2) b1++;
  cout << a1 << " " << b1;
}
