ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules

1793. Tray 2

Time limit: 1.0 second
Memory limit: 64 MB
One of the organizers of the Ural Regional School Programming Contest came to the university cafeteria to have lunch. He took a soup and a main course and tried to arrange them on a small rectangular tray, which was not so easy. “Oops, that's a problem,” he thought. “Oh, yes, that's a problem! A nice problem for the contest!”
The Ural State University's cafeteria has trays with a rectangular a × b bottom and vertical borders of height d. Plates have the shape of a truncated cone. All the plates in the cafeteria have the same height h. The organizer wants to put the plates on the tray so that their bottoms adjoin the bottom of the tray completely. Can he do it?
Problem illustration

Input

The first line contains the integers a, b, and d separated with a space. Each of the following lines describes one of the plates and contains two integers. The former integer is the radius of the plate's bottom and the latter integer is the radius of the circle formed by the edge of the plate. The second radius is greater than the first one. The last line contains the height h of the plates. All the input integers are positive and do not exceed 1000.

Output

Output “YES” if the plates can be arranged on the tray and “NO” otherwise.

Samples

inputoutput
10 10 10
1 2
1 2
5
YES
8 4 1
1 2
1 3
1
NO
Problem Author: Sofia Tekhazheva
Problem Source: Ural Regional School Programming Contest 2010