import java.util.*;
public class Problem125a {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int feet = n/36;
        n-=feet*36;
        System.out.print(feet + " ");
        if(n%3 == 2) {
            System.out.print(n/3+1);
        }
        else {
            System.out.print(n/3);
        }

    }
}
