#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e9 + 7;
const int N = 1e2 + 10;
int main() {
  int n;
  cin >> n;
  int inch = n / 3 + (n % 3 == 2);
  cout << inch / 12 << ' ' << inch % 12 << endl;
  return 0;
}
