题目描述
You are given two sequences of $N$ numbers: $A=(A_1,A_2,\ldots,A_N)$ and $B=(B_1,B_2,\ldots,B_N)$.
Takahashi can repeat the following operation any number of times (possibly zero).
> Choose three pairwise distinct integers $i$, $j$, and $k$ between $1$ and $N$.
> Swap the $i$\-th and $j$\-th elements of $A$, and swap the $i$\-th and $k$\-th elements of $B$.
If there is a way for Takahashi to repeat the operation to make $A$ and $B$ equal, print `Yes`; otherwise, print `No`.
Here, $A$ and $B$ are said to be equal when, for every $1\leq i\leq N$, the $i$\-th element of $A$ and that of $B$ are equal.
### Constraints
- $3 \leq N \leq 2\times 10^5$
- $1\leq A_i,B_i\leq N$
- All values in the input are integers.