#include <iostream>
#include <cstdio>
#include <cstring>
#include <cmath>
using namespace std;
#define N 200020
#define LL long long
int n, x[N], y[N];
bool vis[N];
int m;
int main() {
int cas;
scanf("%d", &cas);
while(cas--) {
scanf("%d%d", &n, &m);
for(int i = 1; i <= n; ++i) {
scanf("%d%d", &x[i], &y[i]);
}
if(n > 700) {
puts("YES");
continue;
}
memset(vis, 0, sizeof vis);
bool f = 0;
for(int i = 1; i <= n; ++i) {
for(int j = i + 1; j <= n; ++j) {
int d = abs(x[i] - x[j]) + abs(y[i] - y[j]);
if(vis[d]) {
f = 1;
break;
}
vis[d] = 1;
}
}
if(f) puts("YES");
else puts("NO");
}
return 0;
}
08-03
923
07-23
683
07-23
658
07-29
464
07-29
418
07-29
380
08-03
360
08-01
357
08-03
354
08-03
349
07-23
348