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