#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,fma")
#pragma GCC optimize("unroll-loops")
using namespace std;
const double eps = 1e-12;
const double PI = acos(-1.0);
const long long INF = 1e18;
const long long MOD = 1e9 + 7;
const long long nax = 5e5 + 5;
long long int gcd(long long int a, long long int b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
bool isPowerOfTwo(long long int x) { return x && (!(x & (x - 1))); }
void solve() {
  long long int i, n, ans, k, m, j;
  cin >> n;
  m = n / 36;
  k = n / 36;
  if (n % 36 != 0) m += 1;
  if ((m * 36 - n) == 1) {
    k += 1;
  }
  cout << k << " ";
  n -= k * 36;
  if (n < 0)
    cout << "0";
  else {
    ans = n / 3;
    if (n % 3 == 2) ans += 1;
    cout << ans;
  }
  return;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  ;
  long long int t = 1, i;
  while (t--) solve();
  return 0;
}
