import java.io.PrintWriter;
import java.util.Scanner;

public class Solution {

    public static void main(String[] args) throws Exception {
        Scanner reader = new Scanner(System.in);
        PrintWriter writer = new PrintWriter(System.out);

        int n = reader.nextInt();

        int feet = 0;
        double diff = n / 36.0;

        while (true) {
            int f2 = feet + 1;
            double diff2 = n / 36.0 - f2;

            if (diff2 <= diff && diff2 >= 0) feet = f2;
            else break;
        }

        long d = Math.round((n - feet * 36) / 3.0);
        if (d < 0) d = 0;

        writer.print(feet + " " + d);
        writer.close();
    }
}