#include <bits/stdc++.h>
using namespace std;
int main() {
  double n;
  cin >> n;
  int m = n;
  int h = n / 36;
  n -= h * 36;
  double g = n / 3;
  int y = round(g);
  if (y == 12) {
    h++;
    y = 0;
  }
  cout << h << " " << y;
  return 0;
}
