#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;
  cout << n / 36 << ' ';
  n = n % 36;
  int a = n / 3;
  if (n % 3 <= 1)
    a += 0;
  else if (n % 3 == 2)
    a++;
  cout << a;
}
