Task: Program Execution
Input (English): n, d, E, 8179, 4187, P, 8637, 7429, 2333, 1033, b, m, 247, 8547
Output (English): 4, 5, 7, 8, 9, 10, 13, 14