#include<iostream>

using namespace std;

void main()
{
	int cm, inch, ft;
	cin >> cm;
	ft = cm / 36;
	cm = cm - ft * 36;
	inch = cm / 3;
	cm = cm - inch * 3;
	if (cm == 2)
	
{
		inch++;
	}
	cout << ft << " " << inch;
}