import java.util.*;
public class A125
{
    public static void main(String aa[])
    {
        Scanner ob=new Scanner(System.in);
        int n,ft,in,c;
 
        n=ob.nextInt();
        ft=n/36;
        c=n%36;
        in=(int)Math.rint(c/3f);
        System.out.println(ft+" "+in);
    }
}