#P2065. AnEasyProblem

AnEasyProblem

A lattice point is an ordered pair (x, y) where x and y are both integers. Given the coordinates of the vertices of a triangle (which happen to be lattice points), you are to count the number of lattice points which lie completely inside of the triangle (points on the edges or vertices of the triangle do not count).

Input

There are multiple test case.
Each test case consists of six integers x1, y1, x2, y2, x3, and y3, where (x1, y1), (x2, y2), and (x3, y3) are the coordinates of vertices of the triangle, and −10000≤ x1, y1, x2, y2, x3, y3 ≤ 10000.

Output

For each input case, you should print the number of internal lattice points on a single line.

Sample Input

0 0 1 0 0 1
0 0 5 0 0 5

Sample Output

0
6

HINT

Source