import java.util.*;
public class Problem0125a {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int inches = (n%3 == 2) ? n/3+1 : n/3;
        System.out.println(inches/12 + " " + inches%12);
    }
}
