Task: Program Execution
Input (English): 9667, r, M
Output (English): 2, 3