#abc259d. [abc259_d]Circumferences
[abc259_d]Circumferences
Problem Statement
You are given circles on the -coordinate plane. For each , the -th circle is centered at and has a radius of .
Determine whether it is possible to get from to by only passing through points that lie on the circumference of at least one of the circles.
Constraints
- lies on the circumference of at least one of the circles.
- lies on the circumference of at least one of the circles.
- All values in input are integers.
Input
Input is given from Standard Input in the following format:
Output
If it is possible to get from to , print Yes
; otherwise, print No
. Note that the judge is case-sensitive.
Sample Input 1
4
0 -2 3 3
0 0 2
2 0 2
2 3 1
-3 3 3
Sample Output 1
Yes
Here is one way to get from to .
- From , pass through the circumference of the -st circle counterclockwise to reach .
- From , pass through the circumference of the -nd circle clockwise to reach .
- From , pass through the circumference of the -rd circle counterclockwise to reach .
Thus, Yes
should be printed.
Sample Input 2
3
0 1 0 3
0 0 1
0 0 2
0 0 3
Sample Output 2
No
It is impossible to get from to by only passing through points on the circumference of at least one of the circles, so No
should be printed.