#include <bits/stdc++.h>
using namespace std;
int a, b;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  if (n % 3 == 2)
    b = n / 3 + 1;
  else
    b = n / 3;
  a = b / 12;
  b %= 12;
  cout << a << endl << b << endl;
  return 0;
}
