You are given two arrays a and b of the same length n.
You are allowed to perform zero or more operations on a of the following kind:
Choose a contiguous subarray of even length and cyclically shift it by an even number of positions. Formally, you choose three integers i,j and k (0≤i<j<k≤n, j−i is even, k−i is even) and a becomes equal to a_0:i+a_j:k+a_i:j+a_k:n, where a_l:r denotes a slice with Python indexing. Precisely, it contains elements in the range of indices \[l,r) in 0-indexing and (l,r] in 1-indexing.
Is it possible to transform a into b?
The first line contains a single integer n (1≤n≤3⋅105), the length of a and b.
The second line contains n integers a_i (1≤a_i≤n), elements of a.
The third line contains n integers b_i (1≤b_i≤n), elements of b.
Print 1 if it is possible to transform s into t and 0 otherwise.