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

        double d = n / 3.0;
        double feet = d / 12.0;
        d %= 12.0;

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

        writer.close();
    }
}