During the last parliament elections in Berland two political parties collected the same amount of votes. Now the first party hired you to help them with their plan of a revolution.
During the revolution they want to split the country into two parts. The party is very democratic, so each member has its own separation plan.
The border of Berland can be considered as a convex polygon on the plane. The polygon can have three or more consecutive vertices lay on one line. Each separation plan is represented by the line of the cut.
Your program should calculate the area of the smallest part of the Berland for each separation plan.
The first line contains integer (3 \le n \le 50~000). Next lines contain coordinates x_i, y_i of the Berland border in the clockwise or counterclockwise order. The polygon is non-degenerate. The next line contains integer (1 \le p \le 50~000). Next lines contain coordinates x_{1,j}, y_{1,j}, x_{2,j}, y_{2,j} of two distinct points on the separation line. All coordinates are real and do not exceed by the absolute value. They are given with no more than decimal places.
Print lines. Each line should contain the area of the smallest part after separating Berland with the corresponding line. Print value with at least digits after decimal point. Absolute or relative error must be less than 10^{-5}.

Example 1