import java.io.*;
public class Baden {
    public static void main(String args[]) throws IOException{
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(in.readLine());
        int feet = n / 36;
        int rem = n % 36;
        int inches = (rem / 3);
        if(rem % 3 == 2) inches =inches + 1;
        
        System.out.println(feet + " " + inches);
    
    }
}