#include <bits/stdc++.h>
using namespace std;
const long double pi = 3.1415926535897932384626433832795;
const long double eps = 0.00000001;
const int INF = 1E9;
const int MAXN = 5000;
int n, a, b;
int main() {
  cin >> n;
  b = n / 3;
  if (n % 3 == 2) b++;
  a = b / 12;
  if (b % 12 > 6) {
    a++;
    b = 0;
  }
  cout << a << ' ' << b % 12;
  return 0;
}
