Ships Approaching#1421

Ships Approaching

1 second
128 megabytes
Medium

August 31, 1986, 22:00. Warm southern night sky in stars, the sea is calm. The passenger steamer "Liberty" with passengers on board departed from the dock port of a southern port city, and, after leaving the bay, went to another port city. Passing the Penaysk banks, the boat took the course degrees and speed knots. people were on board: passengers, crew members...

At this time, the cargo ship "Aurora" was entering the bay with speed knots and course degrees. It had on board about tonnes of barley from Canada. The ships were approaching on intersecting courses...

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

In 1910, Greenland's multi-ton block of ice broke off 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 Queen's Island (Belfast, Northern Ireland), the largest ocean liner, such as "Olympic", which later was called the "Titanic," was founded. During the first voyage, on April 14, 1912, it collided with an iceberg and thus after hours and minutes sank. On board were passengers and crew members, in total people. Of these, people were saved, more than 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, human errors caused the accidents, in other words, people's mistakes. Therefore, to assess the possibility of collision of two objects moving on intersecting courses, this should be automated.

Let's solve a bit simplified problem. Two objects move uniformly in a straight line, starting from the points A and B respectively in given directions with velocities v_1 and v_2. Determine the minimum distance at which these objects can be.

Input

The first line contains four integers — the coordinates of points A and B in meters (x_1, y_1, x_2, y_2), all coordinates belong to the interval from to (inclusive).

The second line contains two integers: the course of the first object in degrees (from to ) and its velocity v_1 in meters per second (from to ).

The third line contains two integers: the course of the second object in degrees (from to ) and its velocity v_2 in meters per second (from to ).

All numbers in lines are separated with at least one space.

Output

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

Examples

Example 1

Loading
Loading