#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, a, b, c;
  cin >> n;
  a = n / 36;
  c = n % 36;
  if (c == 35) {
    cout << a + 1 << " 0" << endl;
    return 0;
  }
  b = c / 3;
  if (c % 3 == 2) b++;
  cout << a << " " << b << endl;
}
