import java.util.Scanner;


public class Main {
     public static void main(String[] args) {
         Scanner scanner = new Scanner(System.in);
         int n = scanner.nextInt();
         long a = Math.round(((double)n)/3.0);
         long b = a /12;
         a = a%12;
         System.out.println(b + " " + a);
         
        
    }

}
