Cover an Arc.

Time Limit
1s
Memory Limit
10000KB
Judge Program
Standard
Ratio(Solve/Submit)
100.00%(1/1)
Description:

A huge dancing-hall was constructed for the Ural State University's 80-th anniversary celebration. The size of the hall is 2000 * 2000 metres! The floor was made of square mirror plates with side equal to 1 metre. Then the walls were painted with an indelible paint. Unfortunately, in the end the painter flapped the brush and the beautiful mirror floor was stained with the paint. But not everything is lost yet! The stains can be covered with a carpet.
Nobody knows why, but the paint on the floor formed an arc of a circle (a centre of the circle lies inside the hall). The dean of the Department of Mathematics and Mechanics measured the coordinates of the arc's ends and of some other point of the arc (he is sure that this information is quite enough for any student of the Ural State University). The dean wants to cover the arc with a rectangular carpet. The sides of a carpet must go along the sides of the mirror plates (so, the corners of the carpet must have integer coordinates).
You should find the minimal square of such a carpet.

Input:

The input consists of six integers. At first the coordinates of the arc's ends are given. The co-ordinates of an inner point of the arc follow them. Absolute value of coordinates doesn't exceed 1000. The points don't belong the same straight line. The arc lies inside the square [-1000,1000] * [-1000,1000].

Output:

You should write to the standard output the minimal square of the carpet covering this arc.

Sample Input:
476 612
487 615
478 616
Sample Output:
66

Submit