import java.io.FileReader;
import java.io.IOException;
import java.util.Scanner;


public class MeasuringLengthsInBaden {
	public static void main(String[] args) throws IOException {
		// TODO Auto-generated method stub
				Scanner in=new Scanner(System.in);
				int cm=in.nextInt();
				int feet=cm/36;
				int inch=(cm%36)/3;
				int rem=cm%36-inch*3;
				if(rem==2)inch++;
				if(inch==12){
					inch=0;
					feet++;
				}
				System.out.println(feet+" "+inch);
				
	}
}
