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

public class ASol {
	
	void solve() throws IOException {
		int n = nextInt();
		int d = n/3;
		int ost = n%3;
		if( ost == 2 ){
			d++;
		}
		out.println( (d/12)+" "+(d%12));
	}

	private static final String INPUT_FILE = "inp.txt";

	public static void main(String[] args) throws IOException {
		// if (new File(INPUT_FILE).exists())
		// System.setIn(new FileInputStream(INPUT_FILE));
		new ASol().solve();
		out.close();
	}

	private BufferedReader in = new BufferedReader(new InputStreamReader(
			System.in));
	private static PrintWriter out = new PrintWriter(System.out);;
	private StringTokenizer st = new StringTokenizer("");

	String nextToken() throws IOException {
		while (!st.hasMoreTokens()) {
			st = new StringTokenizer(in.readLine());
		}
		return st.nextToken();
	}

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

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

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

	String nextLine() throws IOException {
		st = new StringTokenizer("");
		return in.readLine();
	}
}