Honed Hops

No attempts yetTime limit1sMemory limit128 MB

Problem

In the Olympics, appearances do matter!

A long jumper's trajectory gives the height at horizontal position xx as y=max(0,p(x))y = \max(0, p(x)), where p(x)=a(xh)2+kp(x) = a(x-h)^2 + k is a quadratic describing a downward-opening parabola whose vertex (h,k)(h, k) lies in the upper half-plane. That is, a<0a < 0 and k>0k > 0.

Thanks to rigorous training, each jumper always jumps with the same trajectory, and because of corporate sponsorship and branding requirements no two jumpers share the same trajectory.

Adoring fans who want to preserve the moment occasionally sample their favorite athlete's coordinates at various times and write them down, such as (0,0), (1,3), (2,4), (3,3), (4,0), (7,0)(0, 0),\ (1, 3),\ (2, 4),\ (3, 3),\ (4, 0),\ (7, 0). Given two sample sets, determine whether they were taken from the same athlete.

Input

The input contains multiple test cases, each separated by a blank line. Each test case consists of three lines.

The first line contains two integers n1n_1 and n2n_2 (1n1,n2101 \le n_1, n_2 \le 10) separated by a space, giving the number of sample points in the first and second sample sets, respectively.

The second and third lines contain the sample points of each set in the format x1 y1 x2 y2  xn ynx_1\ y_1\ x_2\ y_2\ \cdots\ x_n\ y_n. Every coordinate is an integer, x1<x2<<xnx_1 < x_2 < \cdots < x_n, and for each ii, 0xi1000000 \le x_i \le 100000 and 0yi10000 \le y_i \le 1000. Be careful that your calculations have sufficient precision for all input within these bounds.

Input is terminated by a single line containing 0 0; do not process that line.

Output

For each test case, output a single line: same if the two sample sets are definitely from the same athlete, different if they are definitely from different athletes, and unsure if there is not enough information to tell.