
import java.util.Scanner;


public class measuringlength {
    public static void main(String []ar){
        Scanner sc=new Scanner(System.in);
        int inp=sc.nextInt();
        
        int a=(inp+1)/36;
        int b=((inp+1)-(a*36))/3;
        
        System.out.println(a+" "+b);
    }
}
