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

/**
 * TR2A TODO: javadoc
 * alper (10/29/11)
 */
public class TR2A {
    public static void main(final String[] args) {
        final Scanner scanner = new Scanner(new BufferedInputStream(System.in));
        final PrintWriter writer = new PrintWriter(new BufferedOutputStream(System.out));

        final long n = scanner.nextLong();

        final long inches = (n + 1) / 3;
        writer.print(inches / 12 + " " + inches % 12);

        writer.close();
        scanner.close();
    }
}
