LaLa and Monster Hunting (Part 1)
Time limit5sMemory limit1024 MB
Given N circles with integer centers and radii, determine whether the convex hull of the circles contains the origin.
Problem
A dreadful monster has been spotted in a forest near the city of Sharia. A group of valorous adventurers will hunt it down within a few days, before it hurts anyone. However, knows the real reason those adventurers are willing to take the risk. The monster is known to produce a rare stone in its intestines, and the stone is quite beautiful. wants to obtain the stone before the adventurers do.
will first locate the monster with her . has placed several tools in the forest, and each tool has a power.
Draw a circle centered at each tool, with radius equal to its power. 's locates the monster if and only if the convex hull of the circles contains the monster's location. Write a program that determines whether will be able to locate the monster.
Input
The input is given in the following format:
is the number of tools in the forest. The -th tool is located at and has power . The monster is at .
The input satisfies the following constraints:
- All the numbers in the input are integers.
- for all integers
- for all integers
- The distance between point and the boundary of the convex hull of circles, -th of which is centered at and has radius , is at least .
Output
If 's will successfully locate the monster, print 'Yes'. Otherwise, print 'No'. You may print each character in either case (lower or upper).
Hint
The figures below show the tool placements for the sample tests. The red curve is the boundary of the convex hull.


