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

public class A125 {
	BufferedReader bf=new BufferedReader(new InputStreamReader(System.in));
	StringTokenizer st=null;
	private void  solution() throws IOException{
   int n = nextInt();
	int res = 0;
	int res2 = 0;
    res = n/36 ;
    n = n - 36*(n/36);
    if (n % 3 <= 1){res2 = n/3;} 
    else{ res2 = n/3+1;}
    System.out.println(res);
    System.out.println(res2);
}


String nextToken()throws IOException {
	if(st==null || !st.hasMoreTokens()){
		st = new StringTokenizer(bf.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());
}
public static void main (String args[]) throws IOException{
    new A125().solution();
}
}