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 d = Math.round(n / 3.0);
        long feet = Math.round(d / 12.0);
        d = d - feet * 12;

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

        writer.close();
    }
}