//package I;

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

public class A {

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

}
