import java.util.Scanner;
public class CompilerTest {
	public static void main(String args[]) {
		Scanner in = new Scanner (System.in);
		int x = in.nextInt();
		
		x/=3;
		
		System.out.println (x/12+" "+Math.round(x%12));
	}
}
