#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n;
  cin >> n;
  int ft, in = 0;
  ft = n / 36;
  n %= 36;
  in = n / 3;
  n %= 3;
  if (n == 2) in++;
  if (in == 12) {
    ft++;
    in = 0;
  }
  cout << ft << " " << in;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int t = 1;
  while (t--) solve();
  return 0;
}
