#Lutece2694. Mastiff Shotgun

Mastiff Shotgun

Migrated from Lutece 2694 Mastiff Shotgun

All parts of this problem, including description, images, samples, data and checker, might be broken. If you find bugs in this problem, please contact the admins.

Description

Jeff Lee is falling in love with a game called Apex Legends recently. It is an online multiplayer battle royale game featuring squads of three players using pre-made characters with distinctive abilities.

Jeff Lee picked up a weapon called Mastiff Shotgun at the beginning of a game. Not knowing how it works, he cannot hit even a single enemy. After the game, he trains a lot to use Mastiff Shotgun and figures out how it works.

Now Jeff Lee starts another game and encounters an enemy. Here we describe the enemy as a segment on a one-dimensional axis, ranging from ll to rr. The enemy has hh health points initially. Jeff Lee is now equipped with Mastiff Shotgun. If he aims at xx and takes a shot, the weapon will shoot nn bullets which will hit x+d1,x+d2,,x+dnx+d_1,x+d_2,\ldots,x+d_n respectively at the same time. Each bullet that hits the enemy deals aa points of damage. Formally, if the number of bullets that meet lx+dirl \le x+d_i \le r is kk, the enemy's health point will decrease by kaka. The enemy will be knocked down if his health point is lower than or equal to 00.

Now Jeff Lee wants to know whether he can knock down the enemy after one shot aiming at x0x_0. If he can, tell him how many bullets hit the enemy. Otherwise, tell him how many more shots he needs at least to knock down the enemy apart from the first shoot if he can change his aiming point after the first shot.

Input

The first line contains one integer nn (1n10001 \le n \le 1000), denoting the number of bullets in one shoot.

The second line contains nn integers d1,d2,,dnd_1,d_2,\ldots,d_n (109d1<d2<<dn109-10^9 \le d_1 < d_2 < \ldots < d_n \le 10^9).

The third line contains five integers. The first two integers l,rl,r (109lr109-10^9 \le l \le r \le 10^9) indicate the enemy's position. The third integer hh (1h1091 \le h \le 10^9) indicates the enemy's initial health point. The fourth integer aa (1a1061 \le a \le 10^6) indicates the points of damage for each bullet. The fifth integer x0x_0 (109x0109-10^9 \le x_0 \le 10^9) indicates the aiming point of the first shot.

Output

If Jeff Lee can knock down the enemy after the first shot, output YES\texttt{YES} in the first line. Then output an integer in the second line, indicating the number of bullets that hit the enemy.

If Jeff Lee cannot knock down the enemy after the first shot, output NO\texttt{NO} in the first line. Then output an integer in the second line, indicating the minimum number of shots he needs to knock down the enemy apart from the first shoot. Please note that he can change his aiming point after the first shot.

Samples

7
-4 -2 -1 0 1 2 4
-4 4 70 11 0
YES
7
7
-4 -3 -2 0 1 2 4
-1 1 88 11 0
NO
2

Note

For the first example, all the bullets hit the enemy and deal 7777 points of damage.

For the second example, the first shoot deals 2222 points of damage. Then Jeff Lee can change his aiming point to 33, and each shoot will deal 3333 points of damage. The enemy will be knocked down after two more shots.

Resources

电子科技大学第十二届 ACM 趣味程序设计竞赛