import java.util.Scanner;

public class Solution {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int d;
        int n = scanner.nextInt();
        int f = n / 36;
        if ((n - f * 36) % 3 == 2) {
            d = (n - f * 36) / 3 + 1;
        } else {
            d = (n - f * 36) / 3;
        }
        System.out.println(f + " " + d);
    }
}