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 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 a single integer — the number of valid lattice triangles $$$T$$$. If this number is infinite, print $$$-1$$$ instead.
1 12 22 4
5
3 14 31 3
29
0 099 1000 100
28939
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.
| Name |
|---|


