#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int x = n / 36, y;
  n = n % 36;
  if (n % 3 == 2) {
    y = n / 3 + 1;
  } else {
    y = n / 3;
  }
  if (y == 12) {
    x++;
    y = 0;
  }
  cout << x << " " << y;
  return 0;
}
