Two distinct lattice points and are given in the plane. Find the number of lattice points on the segment , excluding its endpoints and . A lattice point is a point whose two coordinates are integers.
The input is given in the following format:
For each test case, print the number of lattice points on the segment excluding both endpoints, on a separate line.
is the number of test cases. Each case has the following format:
| 2 | 80 | No additional constraints. |