import java.io.BufferedReader;
import java.io.InputStreamReader;

/**
 * @author antonio081014
 * @since Nov 3, 2011, 10:16:33 PM
 */
public class A {

	/**
	 * @param args
	 */
	public static void main(String[] args) throws Exception {
		// TODO Auto-generated method stub
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int N = Integer.parseInt(br.readLine());
		if (N % 3 == 2) {
			N++;
		} else if (N % 3 == 1)
			N--;
		int foot = N / 36;
		int inch = (N % 36) / 3;
		System.out.println(foot + " " + inch);
	}
}
