import java.util.Scanner;

public class A125new {



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