import java.util.Scanner;

public class A {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        int cms = input.nextInt();
        int inches = Math.round(cms / 3.0f);
        int foots = inches / 12;
        inches %= 12;
        System.out.println(foots + " " + inches);
    }
}
