import java.io.BufferedReader;
//import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
//import java.io.FileReader; 
//import java.io.FileWriter;
//import java.lang.StringBuilder;
import java.util.StringTokenizer;
//import java.lang.Comparable;
//import java.util.Arrays;
//import java.util.HashMap;
//import java.util.ArrayList;
//import java.util.LinkedList;

public class MesuringLengthInBaden {
    
    //static BufferedReader in = new BufferedReader(new FileReader("input.txt"));
    //static PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter("output.txt")));
    static BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    static PrintWriter out = new PrintWriter(System.out);
    static StringBuilder sb = new StringBuilder();
    
    public static void main(String[] args) throws IOException {
        int n = Integer.parseInt(in.readLine());
        int r = n % 3;
        if(r == 1) {
            n--;
        } else if(r == 2) {
            n++;
        }
        int f = (n - (n % 36)) / 36;
        int i = (n % 36) / 3;
        out.print(f + " " + i);
        out.close();
    }
}