
import java.util.*;

public class Solution {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int k = sc.nextInt();
        int stk1 = 0, stk2 = 0;
        stk1 = k / 3;
        k -= stk1 * 3;
        if (k == 2) {
            stk1 += 1;
        }
        stk2 = stk1 / 12;
        stk1 -= stk2 * 12;
        System.out.print(stk2 + " " + stk1);
    }
}
