시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
1 초 128 MB 171 66 63 45.652%

문제

알래스카 고속도로는 더슨 크릭(Dawson Creek)과 델타 정션(Delta Junction)를 잇는 길이 1422마일의 고속도로이다.

상근이는 전기 자동차를 타고 더슨 크릭에서 출발해 델타 정션에 갔다가 다시 더슨 크릭으로 돌아오려고 한다. 전기 자동차는 한 번 충전하면 200 마일을 이동할 수 있다. 충전소는 더슨 크릭에 있고, 고속도로 중간 중간에도 있다. 충전소의 위치가 주어졌을 때, 상근이가 여행을 성공적으로 할 수 있는지 없는지를 구하는 프로그램을 작성하시오.

입력

입력은 여러 개의 테스트 케이스로 이루어져 있다. 각 테스트 케이스의 첫째 줄에는 고속도로에 있는 충전소의 수 n이 주어진다. n은 양의 정수이다. 더슨 크릭에 있는 충전소도 n에 포함된다. 둘째 줄부터 n개 줄에는 충전소의 위치가 주어진다. 위치는 더슨 크릭과 떨어진 거리이며, 0보다 크거나 같고, 1422보다 작거나 같다. 두 충전소가 같은 장소에 있는 경우는 없다. 입력의 마지막 줄에는 0이 주어진다.

출력

각 테스트 케이스 마다, 상근이가 전기 자동차를 타고 더슨 크릭에서 델타 정션에 갔다가 다시 더슨 크릭으로 돌아올 수 있으면 POSSIBLE을, 아니면 IMPOSSIBLE을 출력한다.

예제 입력 1

2
0
900
8
1400
1200
1000
800
600
400
200
0
0

예제 출력 1

IMPOSSIBLE
POSSIBLE
W3sicHJvYmxlbV9pZCI6IjQxNTkiLCJwcm9ibGVtX2xhbmciOiIwIiwidGl0bGUiOiJcdWM1NGNcdWI3OThcdWMyYTRcdWNlNzQiLCJkZXNjcmlwdGlvbiI6IjxwPlx1YzU0Y1x1Yjc5OFx1YzJhNFx1Y2U3NCBcdWFjZTBcdWMxOGRcdWIzYzRcdWI4NWNcdWIyOTQgXHViMzU0XHVjMmE4IFx1ZDA2Y1x1YjlhZChEYXdzb24gQ3JlZWspXHVhY2ZjIFx1YjM3OFx1ZDBjMCBcdWM4MTVcdWM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