시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 512 MB4910920.000%

문제

T-net which is a new telecommunications company, plans to install its base stations in the city. The places where base stations must be installed have been already specified. T-net has two types of antennas to be used in the base stations: (i) antennas with transmission radius a, and (ii) antennas with transmission radius b. Two antennas can communicate with each other if and only if both are inside the coverage area of each other. Antenna with smaller transmission radius of course is cheaper. T-net plans to minimize its cost while keeping the whole network connected. Precisely, T-net plans to minimize its cost which is the sum of the transmission radii of all antennas. Interestingly, all base-station places are on a line. Help T-net construct a connected network with the minimum cost.

입력

The first line of the input contains three positive integers n, a and b (1 ≤ n ≤ 105 and 1 ≤ a, b ≤ 105) where n is the number of base stations, and a and b are radii as defined in the problem statement. The second line contains n distinct coordinates of base stations on the line with respect to an origin on the line. All coordinates are positive integers not more than 105.

출력

If it is possible to construct a connected network, print the minimum cost in the output. Otherwise, print -1.

예제 입력 1

3 1 3
1 4 3

예제 출력 1

7