#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <set>
using namespace std; int main()
{
int cases, cols, northRow, southRow;
cin >> cases;
while(cases--)
{
cin >> cols;
set<int> mySet;
for(int i=; i<cols; i++)
{
cin >> northRow >> southRow;
mySet.insert(abs(northRow - southRow));
} if(mySet.size() == )
cout << "yes" << endl;
else cout << "no" << endl; if(cases)
cout << endl;
}
}