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

import static java.lang.Math.* ;
import static java.util.Arrays.* ;

public class A {
	
	public static void main(String[] args) throws IOException {
		
		new A().solveProblem();
		
		out.close();
	}

	static Scanner in = new Scanner(new InputStreamReader(System.in));
	//static BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
	static PrintStream out = new PrintStream(new BufferedOutputStream(System.out));
	
	
	public void solveProblem() {		

		int n = in.nextInt() ;
		
		if( n % 3 == 2 )
			n++ ;
		
		n /=3 ;
		
		System.out.println((n/12) + " " + n%12) ;
	}

       
}