#include <bits/stdc++.h>
using namespace std;
int main() {
  int feet = 0, inches = 0, n;
  cin >> n;
  inches = (n + 1) / 3;
  while (inches >= 12) {
    inches -= 12;
    feet++;
  }
  cout << feet << " " << inches << "\n";
}
