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