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