import java.io.PrintWriter;
import java.util.Scanner;

public class Main {
	public static void main(String args[]) {
		Scanner in = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		
		int l = in.nextInt();
		int inches = Math.round(l/3);
		int foots = inches/12;
		inches%=12;
		out.print(foots);
		out.print(" ");
		out.print(inches);
		in.close();
		out.close();
	}
}
