Task: Program Execution
Input (English): 329, 317, m, s
Output (English): 1, 2, 3, 7, 9