#include <bits/stdc++.h>
using namespace std;
long long int ans;
int arr[300009];
vector<int> vr;
void solve() {
  int n;
  cin >> n;
  ans = 0;
  int ft = n / 36;
  n -= ft * 36;
  int inch = n / 3;
  n -= inch * 3;
  if (n == 2) {
    inch++;
    if (inch == 12) {
      ft++;
      inch -= 12;
    }
  }
  cout << ft << ' ' << inch;
  cout << '\n';
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int testcase = 1;
  for (int t = 0; t < testcase; ++t) {
    solve();
  }
  return 0;
}
