import java.util.Scanner;

public class CF125A {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int x = sc.nextInt();
        int inches = (int) Math.round((double) x / 3.0);
        System.out.printf("%d %d", inches / 12, inches % 12);
    }
}
