"Free HyperCharge !"
Yamen is enjoying having toys, cats, dogs, and other funny things to do in his own room. But ... when things turn out into mess , everything should be arranged ! Therefore, Yamen decided to give a unique enumeration for each of his stuff. According to Yamen, everything is balanced if and only if everything that he owns has a unique ID , and every ID is used only for exactly one thing. Yamen was very confused, worrying about the balance of items , so he may accidentally repeat some of them in the list.
Yamin considers everything to be balanced if and only if , each item name in the list corresponds to single integer and each integer in the list corresponds to single item name.
And since Yamin is confused , He may have repeated some of them in the list. Determine if everything is balanced.
The first line contains a single (1 \le t \le 100) – the number of test cases.
The first line of each test case contains a single integer (1 \le n \le 4 \cdot 10^5) – the number of items Yamen has.
The next lines have two values string a_i and integer b_i (a_i,b_i) , (1 \le |a_i| \le 5 ; 1 \le b_i \le 10^6) where a_i represents the name of the item consisting of only lowercase English characters and b_i represents its own ID.
Pairs (a_i,b_i) are not necessarily distinct for the single list of items
It's guaranteed that the sum of overall tests doesn't exceed 4 \cdot 10^5.
For each test case, if everything is Balanced, print "YES"; otherwise, print "NO".
You can output the answer in any case (for example, the strings "yEs", "yes", "Yes", and "YeS" will be recognized as positive responses).
Example 1
In the first test case , every item of \mathtt{cat,dog,brawl} appeared once and every number appeared only once , so it's Balanced.
In the second test case , appeared twice but with the same ID, so it's correct , but for it's two ID's and , thus it's not Balanced.
In the third test case , everything is Balanced.
In the fourth test case , ID has two items , so it's not Balanced.
In the fifth test , everything is Balanced.
In the sixth test , everything is Balanced since Yamin repeated some of the list items.
Subtask ( points) : (1 \le n \le 3; 1\le b_i \le 4)
Subtask ( points) : (1 \le n \le 50).
Subtask ( points) : (1 \le n \le 1000) + It's guaranteed that every a_i is distinct.
Subtask ( points) : (1 \le n \le 1000) + It's guaranteed that every b_i is distinct.
Subtask ( points) : No additional constraints