import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

/**
 * Created by IntelliJ IDEA.
 * User: tiro
 * Date: 29/10/11
 * Time: 16:56
 * To change this template use File | Settings | File Templates.
 */

public class TaskA extends Thread {

    public void run() {
        try {
            int n = nextInt();

                int foots = n / 36;
                n %= 36;
                int inches = n / 3;
                n %= 3;
                if (n > 1)
                    inches++;
                if (inches==12){
                    inches=0;
                    foots++;
                }
                out.println(foots + " " + inches);


        } catch (Exception ex) {
            ex.printStackTrace();
            System.exit(999);
        } finally {
            out.flush();
            out.close();
        }
    }


    public static void main(String[] args) {
        new TaskA().run();
    }

    public TaskA() {
        in = new BufferedReader(new InputStreamReader(System.in));
        out = new PrintWriter(System.out);
        setPriority(Thread.MAX_PRIORITY);
    }

    private BufferedReader in;
    private PrintWriter out;
    private StringTokenizer stringTokenizer;

    private int nextInt() throws IOException {
        return Integer.parseInt(nextToken());
    }

    private double nextDouble() throws IOException {
        return Double.parseDouble(nextToken());
    }

    private long nextLong() throws IOException {
        return Long.parseLong(nextToken());
    }

    private String nextToken() throws IOException {
        if (stringTokenizer == null || !stringTokenizer.hasMoreElements()) {
            stringTokenizer = new StringTokenizer(in.readLine(), "\t\n\r ");
        }
        return stringTokenizer.nextToken();
    }
}
