Task: Program Execution
Input (English): Q, m, 9083, 1727
Output (English): 17, 13, 9083, 1727