#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int c = n / 36;
  int m = n - (n / 36) * 36;
  if (m % 3 <= 1)
    m /= 3;
  else
    m = m / 3 + 1;
  if (m >= 12) m -= 12, c++;
  cout << c << " " << m << endl;
  return 0;
}
