import java.util.Scanner;

public class prueba {

    /**
     * @param args
     */
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int c = scanner.nextInt();
        int f = c / 36;
        int i = c % 36;
        i = i / 3 + (i % 3 < 2 ? 0 : 1);
        System.out.printf("%d %d\n", f, i);
    }
}
