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