import java.util.Scanner;
public class length {
	public static void main(String[] args){
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		int a = (n+1)/36;
		int b = ((n+1)%36)/3;
		System.out.println(a+" "+b);
	}
}
