#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  cout << (n / 3 + (n % 3 > 1 ? 1 : 0)) / 12 << " "
       << (n / 3 + (n % 3 > 1 ? 1 : 0)) % 12 << endl;
  return 0;
}
