Lionel Messi, the celebrated hero of the Argentinian national football team, experienced the thrill of the FIFA World Cup Qatar 2022. His exceptional football skills brought Argentina closer to glory and ignited national pride.
During a post-World Cup celebration, Messi stumbled upon a prestigious sports lounge hosting an archery competition. Intrigued by the precision and challenge of archery, he decided to test his skills on the grand stage of this esteemed establishment. To the amazement of onlookers and media, Messi's natural talent for hand-eye coordination and competitive spirit translated seamlessly to the archery target board, leaving a lasting impression.
Archery is a sport that involves shooting arrows at a target board. However, this version of archery differs from the standard form.
In this particular version, the archery target board is divided into four circles, each with its own unique color and score. Additionally, each player is allowed to shoot only once. Consequently, when a player shoots an arrow and it lands in a specific circle among the four, they will receive scores based on that circle.
So, Lionel Messi will shoot an arrow at the archery board, specifically at coordinates . It is guaranteed that the arrow will always hit the board. If the arrow is shot on the line of circumference of any circle then the score will be considered for that particular circle.
The radius of the four circles and the center coordinate for all circles are given.
Now, calculate the score Lionel Messi will receive from this shot.
The first line of the test case consists of four space-separated integers and — indicating Lionel Messi's arrow position and the center coordinates of the four circles.
The second line of the input consists of four space-separated float values — indicating the radius of the four circles.
Output a single integer value — the score Lionel Messi gets after the arrow shoots to the board.
0 7 0 0 7.00 14.00 21.00 28.00
2 13 0 0 4.50 9.00 13.50 18.00
Formula of Distance Between Two coordinate is,