import java.io.*;

/**
 * Created by KC on 4/8/14.
 */
public class MeasuringLength {
    static BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(System.in));
    static PrintWriter printWriter = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));

    public static void main(String[] args) throws IOException{
        int n = Integer.parseInt(bufferedReader.readLine());
        int feet = n / 36;
        n = n % 36;
        int inch = n / 3;
        n = n % 3;
        if(n > 1) inch++;

        if(inch >= 12){
            feet++;
            inch -= 12;

        }

        printWriter.print(feet + " " + inch);
        printWriter.flush();
        printWriter.close();



    }
}
