#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  switch (n % 3) {
    case 1:
      n--;
      break;
    case 2:
      n++;
      break;
  }
  cout << (n / 36) << " " << (n % 36) / 3 << endl;
  return 0;
}
