#include <bits/stdc++.h>
using namespace std;
void __print(int x) { cerr << x; }
void __print(long x) { cerr << x; }
void __print(long long x) { cerr << x; }
void __print(unsigned x) { cerr << x; }
void __print(unsigned long x) { cerr << x; }
void __print(unsigned long long x) { cerr << x; }
void __print(float x) { cerr << x; }
void __print(double x) { cerr << x; }
void __print(long double x) { cerr << x; }
void __print(char x) { cerr << '\'' << x << '\''; }
void __print(const char *x) { cerr << '\"' << x << '\"'; }
void __print(const string &x) { cerr << '\"' << x << '\"'; }
void __print(bool x) { cerr << (x ? "true" : "false"); }
template <typename T, typename V>
void __print(const pair<T, V> &x) {
  cerr << '{';
  __print(x.first);
  cerr << ',';
  __print(x.second);
  cerr << '}';
}
template <typename T>
void __print(const T &x) {
  int f = 0;
  cerr << '{';
  for (auto &i : x) cerr << (f++ ? "," : ""), __print(i);
  cerr << "}";
}
void _print() { cerr << "]\n"; }
template <typename T, typename... V>
void _print(T t, V... v) {
  __print(t);
  if (sizeof...(v)) cerr << ", ";
  _print(v...);
}
const long long mod = 1e9 + 7;
const long long N = 4e5 + 5;
void solve() {
  long long n;
  cin >> n;
  ;
  long long nukkle = n % 36;
  if (nukkle == 0) {
    cout << n / 36 << " "
         << "0";
    return;
  }
  long long need = 36 - nukkle;
  if (need == 1) {
    cout << (n + 1) / 36 << " "
         << "0";
    return;
  }
  long long t1 = n / 36;
  cout << t1 << " ";
  n = n % 36;
  long long rem = n % 3;
  if (rem == 0) {
    cout << n / 3 << " ";
    return;
  }
  long long chahiye = 3 - rem;
  if (chahiye == 1) {
    cout << (n + 1) / 3 << " ";
    return;
  }
  cout << n / 3 << " ";
}
int32_t main() {
  long long t;
  t = 1;
  while (t--) {
    solve();
  }
}
