import java.io.*;
import java.util.*;
public class Main {

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

}
