import java.util.Scanner;


public class A_125 {

    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        
        int n=sc.nextInt();
        
        n=(n+1)/3;
        
        System.out.println(n/12+ " "+n%12);
    }

}
