Given the coordinates of the vertices of a triangle (which happen to be lattice points), you must count the number of lattice points that lie completely inside the triangle (points on the edges or vertices of the triangle do not count).
Each line consists of six integers x[1]
, y[1]
, x[2]
, y[2]
, x[3]
, and y[3]
, where (x[1], y[1])
, (x[2], y[2])
, and (x[3], y[3])
are the coordinates of triangle vertices. All triangles are non-degenerate (have positive area) and -15000 ≤ x[1]
, y[1]
, x[2]
, y[2]
, x[3]
, y[3]
≤ 15000. The last line contains six zeros and should not be processed.
For each input line print the number of internal lattice points in a single line.