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

/**
 * 125A
 * θ(1) time
 * θ(1) space
 *
 * @author artyom
 */
public class _125A implements Runnable {
    private BufferedReader in;
    private StringTokenizer tok;

    private Object solve() throws IOException {
        int n = nextInt(), f = n / 36, r = n % 36, i = r / 3;
        r %= 3;
        if (r == 2) {
            i++;
        }
        if (i == 12) {
            i = 0;
            f++;
        }
        return f + " " + i;
    }

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

    @Override
    public void run() {
        try {
            in = new BufferedReader(new InputStreamReader(System.in));
            tok = null;
            System.out.print(solve());
            in.close();
        } catch (IOException e) {
            System.exit(0);
        }
    }

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

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