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 count = l%3;
		int inches = 0;
		if (count==2) inches = (l+1)/3; else inches = l/3;
		int foots = inches/12;
		inches%=12;
		out.print(foots);
		out.print(" ");
		out.print(inches);
		in.close();
		out.close();
		System.exit(0);
	}
}
