Line of Sight

Time limit1sMemory limit128 MB

Problem

An architect is proud of a newly built house and wants to know how visible it is from the street that runs along the property line. The lot contains trees, shrubs, hedges, and other obstructions that may block the view. For this problem, model the house, the property line, and every obstruction as horizontal segments (parallel to the x-axis):

Write a program that, given the positions of the house, the property line, and the obstructions, computes the length of the longest continuous portion of the property line from which the entire house is visible. A viewpoint on the property line sees the entire house when, for every point of the house, the straight segment joining the viewpoint to that point is not crossed by any obstruction.

Input

Every object is a horizontal segment given by its left x-coordinate, its right x-coordinate, and its y-coordinate:

x1 x2 y

where x1, x2, and y are non-negative real numbers with x1 < x2.

One input may describe several houses. For each house:

  • the first line gives the house segment;
  • the second line gives the property-line segment;
  • the third line contains a single integer, the number of obstructions;
  • each of the following lines gives one obstruction segment.

A line 0 0 0 follows the last house and marks the end of input.

For every house the house lies strictly above its property line (house y > property-line y). No obstruction overlaps the house or the property line; in particular, if an obstruction shares the house's y-coordinate, its x-range does not intersect the house's x-range.

Output

For each house, print on its own line the length of the longest continuous segment of the property line from which the entire house is visible, rounded to exactly 2 decimal places. If no part of the property line can see the entire house, print No View instead.