Lena wrote a function that shuffles an array - it should return the same numbers in a random order and nothing else. She ran it on a pile of test arrays, but looking at the results she cannot tell whether the function is correct.
Help her: given the array she started from and the array her function returned, check whether the second one is a permutation of the first, meaning it can be obtained from it by only changing the order of its elements. Equal numbers may repeat, and then they have to repeat the same number of times in both arrays.
Input
First line of input will be a single integer - the number of testcases.
First line of each testcase contains an integer - the length of the starting array, and the second line contains its elements.
Third line contains an integer - the length of the returned array, and the fourth line contains its elements.
Output
For every testcase print YES if the second array is a permutation of the first one, and NO otherwise.
Example
2 5 1 3 2 4 3 5 4 3 2 3 1 3 1000000000000000000 5 1000000000000000000 3 1000000000000000000 5 5
YES NO
In the first testcase both arrays contain one , one , two s and one . In the second one the value appears twice in the starting array but only once in the returned one, so the function lost a number.
Constraints
the sum of over all testcases does not exceed
This problem was adapted, with permission, from Provera permutacija, authored by Društvo matematičara Srbije and Fondacija Petlja.