import java.util.*;


public class Main {

	public static void main(String[] args) {
		Scanner kb = new Scanner(System.in);
		int n = kb.nextInt();
		int inch = n/3;
		int remain = n-(inch*3);
		if(remain>1)inch++;
		int feet = inch / 12;
		remain = inch - (feet*12);
		System.out.println(feet+" "+remain);
	}

}
