import java.util.*;

public class cf125a {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		int inch = (n+1)/3;
		int ft = inch/12;
		inch %=12;
		System.out.println(ft + " " + inch);
	}
}
