
import java.util.Scanner;

public class A125 {

	public static void main(String args[]){
		
		Scanner in =new Scanner(System.in);
		int n=in.nextInt();
		
		int ra=n%36;
		int a=n/36;
		if(ra>=18)
			a++;
		n-= a*36;
		if(n<0)
			n=0;
		int b =n/3;
		int rb=n%3;
		if(rb>=2)
			b++;
		System.out.println(a +" "+ b);
	
	}
}
