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