#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int u = 0;
  double h = 0.0;
  u = n / 36;
  n = n % 36;
  h = (n * 1.0 / 3 * 1.0);
  int j = n / 3;
  h = h - j;
  if (h >= 0.5)
    h = 1.0;
  else
    h = 0.0;
  h += j;
  if (h == 12) {
    u += 1;
    h -= 12;
  }
  cout << u << " " << h << endl;
}
