#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 5;
const long long MOD = 1000000007;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  int a = 0;
  if (n % 3 == 2) a++;
  a += n / 3;
  cout << a / 12 << ' ' << a % 12;
}
