import java.util.Scanner;

public class Measuring {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        int inc,sen,fet,i,j;
        while (input.hasNext()){
            sen = input.nextInt(); inc = 0;
            if (sen % 3 == 1) inc = 0;
            else if (sen % 3 == 2) inc++;
            inc  += (sen/3);
            fet = inc / 12;
            inc %= 12;
            System.out.println(fet + " " + inc);
        }
    }
}
