AT_abc461_b [ABC461B] The Honest Woodcutters

Description

$ N $ woodcutters $ 1, 2, \dots, N $ each have one axe. All of them dropped their axes into a pond. $ N $ axes $ 1, 2, \dots, N $ were found sunk in the pond. Each woodcutter $ i $ claims that "I owned axe $ A_i $ ." On the other hand, the goddess of this pond knows that the woodcutter who owned axe $ i $ is woodcutter $ B_i $ . Determine whether all $ N $ woodcutters are telling the truth.

Input Format

The input is given from Standard Input in the following format: > $ N $ $ A_1 $ $ A_2 $ $ \dots $ $ A_N $ $ B_1 $ $ B_2 $ $ \dots $ $ B_N $

Output Format

Output `Yes` if all $ N $ woodcutters are telling the truth, and `No` otherwise.

Explanation/Hint

### Sample Explanation 1 All $ N $ woodcutters are telling the truth. ### Sample Explanation 2 Woodcutters $ 2 $ and $ 3 $ are lying. ### Constraints - $ 1 \leq N \leq 100 $ - $ 1 \leq A_i \leq N $ - $ 1 \leq B_i \leq N $ - $ A_i \neq A_j\;(i \neq j) $ - $ B_i \neq B_j\;(i \neq j) $ - All input values are integers.