J. Lattice Triangles
time limit per test
2 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output

A lattice triangle is a triangle in the plane whose vertices have integer coordinates. You are given a lattice triangle $$$S$$$. How many lattice triangles $$$T$$$ contain a vertex of $$$S$$$ on each of their sides, without sharing any vertices with $$$S$$$?

Input

Input consists of three lines, each containing two integers $$$x$$$ and $$$y$$$ ($$$0 \le x, y \le 100$$$) — the coordinates of one of the vertices of $$$S$$$. Vertices are given in counterclockwise order, and it is guaranteed that they are not collinear.

Output

Output a single integer — the number of valid lattice triangles $$$T$$$. If this number is infinite, print $$$-1$$$ instead.

Examples
Input
1 1
2 2
2 4
Output
5
Input
3 1
4 3
1 3
Output
29
Input
0 0
99 100
0 100
Output
28939
Note

Here are the five possible triangles for the first test case:

The triangle given in the second test case is the triangle from the image in the statement.