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();

        long feet = Math.round((double)n / 36);
        long d = Math.round((double)(n - feet * 36) / 3);

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

        writer.close();
    }
}