atcoder#ARC155C. [ARC155C] Even Sum Triplet
[ARC155C] Even Sum Triplet
Score : points
Problem Statement
You are given integer sequences of length : and .
You may perform the following operation any number of times:
- Choose an integer such that is even. Then, rearrange , , as you like.
Determine whether it is possible to make equal .
Constraints
- All values in the input are integers.
Input
The input is given from Standard Input in the following format:
Output
If it is possible to make equal , print Yes
; otherwise, print No
.
5
1 2 3 4 5
3 1 2 4 5
Yes
is , which is even, so you can choose .
If you choose and rearrange into , then becomes .
Now equals , so you should print Yes
.
5
1 2 4 6 5
5 1 4 2 6
No
9
2 10 4 3 6 2 6 8 5
2 4 10 3 8 6 6 2 5
Yes