#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int x = n / 3;
  int y = n - (x * 3);
  if (y == 2) {
    x = x + 1;
  }
  int z = x / 12;
  int b = x % 12;
  cout << z << " " << b;
}
