DMOPC '17 Contest 2 P0 - Secrets

View as PDF

Submit solution


Points: 3
Time limit: 2.0s
Memory limit: 64M

Author:
Problem type

Two secret agents are exchanging messages over a computer, however, they notice that there is a shady being nearby. Given the coordinates of the two secret agents (x1,y1) and (x2,y2), and the shady being, (xs,ys), is the shady being within D units of an agent?

Constraints

100x1,y1,x2,y2,xs,ys100
1D100

Input Specification

The first line will consist of two space separated integers, x1 and y1.
The second line will consist of two space separated integers, x2 and y2.
The third line will consist of two space separated integers, xs and ys.
The fourth and final line of input will consist of a single integer, D

Output Specification

Yes, if the agent is within D units of either agent, and No otherwise.

Sample Input

Copy
1 10
2 3
3 3
10

Sample Output

Copy
Yes

Explanation for Sample Output

The distance between the second secret agent and the shady being is 1, which is less than or equal to 10. The distance between the first secret agent and the shady being is 53, which is also less than or equal to 10.


Comments

There are no comments at the moment.