#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int foots = 0;
  int inches = 0;
  foots = n / 36;
  int a = n % 36;
  inches = (a + 1) / 3;
  cout << foots << " " << inches << endl;
  return 0;
}
