import java.util.Scanner;

public class MainClass {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner inp = new Scanner(System.in);
		int num = inp.nextInt();
		
		int ans;
		ans= num/36;
		
		System.out.print(ans+" ");
		ans=num - ans*36;
		if((ans+1)%3==0)
			System.out.println((ans+1)/3);
		else if((ans+2)%3==0)
			System.out.println((ans+2)/3);
		else if((ans)%3==0)
			System.out.println(ans/3);
	}

}
