Module: (Java) Workshop-2 "Chess and chess players". Conditional operator


Problem

13 /13


*Darts

Problem

Willy played a friendly match with Emmy for the title world champion. When they got tired of long chess battles, they switched to darts. The game of darts was as follows: everyone threw a dart into a circle, which was located at a distance of several meters. The circle had a special marking, divided into several areas by circles with a radius of 10 and a radius of 5 (see figure).  A dart hitting the red area brought 20 points, hitting the green one - 15< /code> points, hitting yellow is 30 points, and hitting the center is 50 points. If the dart hit the border of the regions, then this gave a number of points equal to the maximum score from the bordering regions.
A dart hit will be conditionally encoded by a point with the coordinate (x ,y). Willy and Emmy made 2 throws with darts. It is necessary to calculate which of them won.
Write a program that will count and display the winner of this game. Output the name of the winner (W - Willie, E - Emmy) and, separated by a space, their points. If equal, output W=E and the number of points.

Input
The input is 4 lines with 2 numbers in each line (all numbers are integers). The first two lines are   coordinates of points (x ,y) where Willy's darts hit (W), the third and fourth lines - where Emmy's darts hit ( E).

Imprint
Print the name of the winner (W - Willie, E - Emmy) and, separated by a space, their scores. If equal, output W=E and the number of points scored, separated by a space.
 

 

Examples
# Input Output
1 0 0
-5 7
1 1
5 7
W 65
2 0 0
5 5
0 0
5 5
W=E 70