Medium

Execution time limit is 1 second

Runtime memory usage limit is 64 megabytes

m (m ≤ 100) candles are placed on a square cake of size n×n (n ≤ 100). Determine whether a straight cut can divide the cake into two parts of equal size so that all the candles will be on one part. The candles are considered as points. The cut can not pass through the candle.

The first line contains the number of tests. The first line of each test contains the length n of the square. The second line contains the number of candles m on the cake. The third line - the coordinates of candles, separated by spaces: x_1 y_1 x_2 y_{2 }… x_m y_m, 0 < x_i, y_i < n, given in a coordinate system with origin at one corner of the square and the axles - sides of the square. All numbers are positive integers. The coordinates of all the candles are different.

For each test case print the string containing YES, if such a separation is possible, or NO otherwise.

Input #1

Answer #1