import java.io.*;
import java.util.*;

/**
 * Codeforces #125A ""
 * @link http://codeforces.ru/problemset/problem/125/A
 * @author Caesar
 */
public class Solution125A implements Runnable {

    private static final int EXIT_CODE = -1;
    private static final boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE") != null;
    private static final String INPUT = "input.txt";
    private static final String OUTPUT = "output.txt";

    private StringTokenizer tok;
    private BufferedReader in;
    private PrintWriter out;

    public static void main(String[] args) {
        new Thread(new Solution125A()).start();
    }

    public void run() {
        try {
            in = ONLINE_JUDGE ?
                new BufferedReader(new InputStreamReader(System.in)) :
                new BufferedReader(new FileReader(INPUT));
            out = ONLINE_JUDGE ? new PrintWriter(System.out) : new PrintWriter(OUTPUT);
            long start = System.currentTimeMillis();
            try {
                solve();
            } finally {
                if (ONLINE_JUDGE) {
                    out.flush();
                } else {
                    out.close();
                }
            }
            System.err.println("Time used: " + (System.currentTimeMillis() - start));
        } catch (Throwable ex) {
            ex.printStackTrace();
            System.exit(EXIT_CODE);
        }
    }

    private String readString() throws IOException {
        while (tok == null || !tok.hasMoreTokens()) {
            tok = new StringTokenizer(in.readLine());
        }
        return tok.nextToken();
    }

    private int readInt() throws IOException {
        return Integer.parseInt(readString());
    }

    public void solve() throws IOException {
        int n = readInt();
        int d = (int)Math.round(n / 3.0);
        out.print(d / 12);
        out.print(' ');
        out.println(d % 12);
    }

}
