#include <bits/stdc++.h>
using namespace std;
void Speed() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
int main() {
  Speed();
  int n, in, f;
  cin >> n;
  if (n >= 36) {
    f = n / 36;
    in = n - (f * 36);
  } else {
    f = 0;
    in = n;
  }
  int tm = in / 3;
  in -= (tm * 3);
  if (in == 2) tm++;
  if (tm >= 12) {
    int tt = tm / 12;
    tm -= (tt * 12);
    f += tt;
  }
  cout << f << " " << tm << endl;
  ;
  return 0;
}
