There are
N persons in Bytetown, with the
iii-th person having an item of type
Ai. These persons want to exchange items with each other through the following operation:
-
Choose two persons i,j(i≠j), exchange the item owned by the i-th person and the j-th person.
They want to perform this operation
exactly once between each pair of persons
(i,j) with
1≤i<j≤N. At the end of this sequence of operations, the
i-th person wants to own an item of type
Bi. They want to know if there exists a sequence of operation achieving this requirement. Can you help them?