import java.util.Scanner;
public class test45{
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        int n = input.nextInt();
        int feet=n/36;
        int restOfN=n-(36*feet);
        int inches=(restOfN+1)/3;
        System.out.println(feet+" "+inches);
    }
}