#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n, r;
  cin >> n;
  r = n / 3;
  int k = n % 3;
  if (r >= 12) {
    {
      int v = r / 12;
      cout << v;
      r = r % 12;
    }
    if (k > 1) {
      cout << " " << r + 1;
    } else
      cout << " " << r;
  } else {
    r = r / 3;
    if (k > 1) {
      cout << "0 " << r + k;
    } else
      cout << "0 " << r;
  }
  return 0;
}
