050. The Array Checker-inator!
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

Given two arrays of integers, check if they are equal... But, if the arrays can be made equal through the removal of duplicates or sorting, they are equal.

Input

The first line will represent the elements, n, in the first array. Then, you will be given n integers inputted on their own lines. After that, another integer will be inputted, which represents the elements, m, in the second array. Then m integers will follow, all being inputted on separate lines.

Output

Print "YES" (without the quotes) if you these arrays are equal (or if they are equal after removing duplicates and sorting them), or "NO" (without the quotes) if the arrays cannot be made equal.

Examples
Input
3
1
2
3
5
1
1
2
2
3
Output
YES
Input
4
1
2
3
4
3
1
2
7
Output
NO