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