#include <bits/stdc++.h>
int arr[101];
int n, m, k, ans, cnta, cntb, cntc;
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  int a, x = 0, y = 0;
  cin >> a;
  for (int i = -1; i <= a; i += 3) {
    if (i == a) {
      if ((a / 3) % 12 + 1 == 12) {
        x++;
        y -= 12;
      }
      cout << (a / 3) / 12 + x << " " << (a / 3) % 12 + 1 + y;
      return 0;
    }
  }
  cout << (a / 3) / 12 << " " << (a / 3) % 12;
}
