import java.util.*;
public class P125A {
    public static void main(String[] args)
    {
        Scanner in = new Scanner(System.in);
        
        int N = in.nextInt();
        
        int inch = N/3;
        
        if (N%3 == 2) ++inch;
        
        System.out.println((inch/12) + " " + (inch%12));
    }
}
