eolymp
bolt
Try our new interface for solving problems
Problems

Ships Approaching

Ships Approaching

Time limit 1 second
Memory limit 128 MiB

August 31, 1986, 22:00. Warm southern night sky in stars, the sea is calm. The steamer "Admiral Nakhimov" with passengers on board departed from the dock port of Novorossiysk, and following the out of Tsemess Bay, went to Sochi. Passing the Penaysk banks, the boat took the course 160 degrees and speed 12 knots. 1234 people were on board: 888 passengers, 346 crew members ...

At this time, the cargo ship "Peter Vasev" was entering the Tsemess Bay with speed 11.5 knots and course 36 degrees. It had on board about 30 000 tonnes of barley from Canada. The ships were approaching on intersecting courses ...

In the last trip the ferry "Dona Paz" went on December 20, 1987. Around 22 p.m. that day near the island of Marinduque the ferry collided with the tanker "Vector» (Vertor). From the blow "Dona Paz" was broken in half. 8000 barrels of oil from the tanker ignited, the fire started ...

In 1910, Greenland's multi-ton block of ice was broken from the mainland and began its voyage in the waters of the North Atlantic. A year earlier, in the shipyards of shipbuilding company "Harland and Wolff" in the Queen's Island (Belfast, Northern Ireland) was founded the largest ocean liner, such as "Olympic", which later was called the "Titanic." During the first flight April 14, 1912, it collided with an iceberg and thus after 2 hours and 40 minutes sank. On board were 1316 passengers and 892 crew members, only 2208 people. Of these, 706 people were saved, more than 1500 were killed...

There are many more examples of this sad statistic. The collisions take place not only on the water but also in the air. As a rule, in all the above cases, the human errors caused the accidents, in other words, people's mistakes. Therefore, to assess the possibility of collision of two objects moving intersecting courses, should be automated.

Lets solve a bit simplified problem. Two objects move uniformly in a straight line, starting from the points А and В respectively in given directions with velocities v[1] and v[2]. Determine the minimum distance at which these objects can be.

Input data

The first line contain four integers - the coordinates of points А and В in meters (x[1] y[1] x[2] y[2]), all coordinates belong to the interval from -100 to 100 (inclusive). The second line contains two integers: the course of the first object in degrees (from 0 till 359) and its velocity v[1] in meters per second (from 1 to 10). The third line contains two integers: the course of the second object in degrees (from 0 to 359) and its velocity v[2] in meters per second (from 1 to 10). All numbers in lines are separated with at least one space.

Output data

Print one number - the minimum distance at which these objects can be with two digits after the decimal point.

Examples

Input example #1
0 0 2 0
45 2
135 1
Output example #1
0.63