#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n;
  cin >> n;
  int t = 0;
  if (n >= 36) {
    if (n % 36 >= 34) {
      t = n / 36 + 1;
      cout << t << " ";
    } else {
      t = n / 36;
      cout << t << " ";
    }
  } else {
    cout << (n >= 34 ? 1 : 0) << " ";
  }
  cout << (n - t * 36 <= 0
               ? 0
               : (n % 36 == 1 ? 0 : n % 36 / 3 + (n % 36 % 3 <= 1 ? 0 : 1)));
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  solve();
  return 0;
}
