#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int inches = n / 3;
  int cm = n % 3;
  if (cm == 2) {
    inches++;
  }
  int foot = inches / 12;
  int in = inches % 12;
  cout << foot << " " << in;
  return 0;
}
