#include <bits/stdc++.h>
using namespace std;
const long double sqr5 = sqrt(5), p_ = (1 + sqr5) / 2;
long long tavan(long long a, long long b) {
  return (b) ? (tavan((a) * (a), (b) >> 1) * ((b)&1 ? (a) : 1)) : 1;
}
long long tavan(long long a, long long n, long long mod) {
  long long p = 1;
  while (n > 0) {
    if (n % 2) {
      p = p * a;
      p %= mod;
    }
    n >>= 1;
    a *= a;
    a %= mod;
  }
  return p % mod;
}
long double fib(long long x) {
  return (tavan(p_, x) - tavan(1 - p_, x)) / (sqr5);
}
long long gcd(long long a, long long b) {
  return ((a) < (b)) ? gcd((b), (a))
                     : (((a) % (b) == 0) ? (b) : gcd((b), (a) % (b)));
}
bool isprime(long long x) {
  for (long long i = 2; i * i <= (x); i++)
    if (!((x) % (i))) return false;
  return true;
}
bool chckmd(long long a, long long mod, long long b) {
  if ((a - b) >= 0 && !((a - b) % (mod))) return 1;
  return 0;
}
template <class T>
inline void smx(T &x, T y) {
  x = max((x), (y));
}
template <class T>
inline void smn(T &x, T y) {
  x = min((x), (y));
}
ifstream fin("input.txt");
ofstream fout("output.txt");
long long n;
int main() {
  cin >> n;
  cout << (n / 36) << " " << ceil((long double)(n % 36) / 3) << "\n";
  return 0;
}
