ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules

1633. Hippogriffs

Time limit: 1.0 second
Memory limit: 64 MB
About twenty years ago, the dispute concerning the danger of hippogriffs was over at last. The Ministry of Magic issued a decree ordering the calculation of a hippogriff's danger according to the formula sqrt(A2 + B2), where A is the length of the hippogriff's beak and B is the length of its claws.
One farmer in the north of England bred hunter hippogriffs, but always had trouble finding customers. A kind wizard advised the farmer to buy a mutation elixir, which could make hippogriffs look more dangerous (then the creature would be more suitable for hunting). The farmer bought the elixir at a local magic shop and used it on his stock. He found that if a hippogriff of nonzero danger whose beak was A in length and claws were B in length drank the elixir, the length of its beak became a1A + b1B and the length of its claws became a2A + b2B. The quality of an elixir is the maximal influence of this elixir on a hippogriff (any hippogriff, and not only those at the farm), and the influence of an elixir on a hippogriff is the factor by which the danger of this hippogriff increases after the mutation. The farmer suspects that the salesman cheated him by selling an elixir of lower quality than usual. He wants to calculate the quality of an elixir using parameters a1, b1, a2, b2.

Input

The first line contains the integers a1 and b1. The second line contains the integers a2 and b2. The parameters are nonnegative and don't exceed 106.

Output

Output the quality of the elixir with the given parameters accurate to 9 fractional digits.

Samples

inputoutput
1 2
3 4
5.4649857042190426504511884932842
1 2
2 4
5
Problem Author: Igor Chevdar
Problem Source: XIII Open USU Championship