시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
1 초 512 MB 7 2 2 28.571%

## 문제

Having stocked up with snowballs, Zenyk and Marichka already wanted to start a game.

But suddenly, Zenyk thought that throwing snowballs on a flat surface is boring. He wanted to build as high as possible hill for himself to climb at it and throw snowballs at Marichka.

Building of a hill isn’t easy. Zenyk treated it seriously, took a sheet of paper with coordinate axes, where y-axis is directed upwards, and began to draw the cross section of a hill (a front view).

Marichka doesn’t want the hill to be too high, so she imposed some constraints at its section.

1. Section must be a polygonal chain.
2. The chain must start at point (x0, y0) and end at point (xn, yn).
3. The chain must contain n segments.
4. The length of the i-th segment should be li.

Zenyk wants to know the maximum height he of a hill he can make under these constraints, and asks you the maximal y-coordinate of the hill’s section. Help him find it.

## 입력

The first line contains four integers x0, y0, xn, yn (|x0|, |y0|, |xn|, |yn| ≤ 106) – coordinates of start and end of the chain.

The second line contains an integer n (1 ≤ n ≤ 105) — number of segments in the chain.

The third line contains n integers l1, . . . , ln (1 ≤ li ≤ 106) — lengths of the segments.

## 출력

If there is no hill that satisfies these constraints, output “IMPOSSIBLE”.

Otherwise, output one real number — the maximum y-coordinate of the highest point. The answer will be considered correct if its absolute or relative error doesn’t exceed 10−7.

## 예제 입력 1

2 3 8 3
2
5 5


## 예제 출력 1

7.0000000000


## 예제 입력 2

4 7 44 77
4
4 7 7 4


## 예제 출력 2

IMPOSSIBLE