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