시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 256 MB52831425365.375%

문제

You are hosting a party and do not have room to invite all of your friends. You use the following unemotional mathematical method to determine which friends to invite.

Number your friends 1, 2, . . . , K and place them in a list in this order. Then perform m rounds. In each round, use a number to determine which friends to remove from the ordered list.

The rounds will use numbers r1, r2, . . . , rm. In round i remove all the remaining people in positions that are multiples of ri (that is, ri, 2ri, 3ri, . . .) The beginning of the list is position 1.

Output the numbers of the friends that remain after this removal process.

입력

The first line of input contains the integer K (1 ≤ K ≤ 100). The second line of input contains the integer m (1 ≤ m ≤ 10), which is the number of rounds of removal. The next m lines each contain one integer. The ith of these lines (1 ≤ i ≤ m) contains ri (2 ≤ ri ≤ 100) indicating that every person at a position which is multiple of ri should be removed.

출력

The output is the integers assigned to friends who were not removed. One integer is printed per line in increasing sorted order.

예제 입력 1

10
2
2
3

예제 출력 1

1
3
7
9