# Arrange the array CodeChef Solution

### We Are Discuss About CODECHEF SOLUTION

Arrange the array CodeChef Solution

## Problem

Chef hasÂ ďż˝Â books such that theÂ ďż˝ďż˝â„ŽÂ book hasÂ ďż˝ďż˝Â pages. He wants to divideÂ allÂ the books between Alice and Bob such that:

• Both Alice and Bob getÂ at leastÂ one book;
• The number of pages allotted to Alice and Bob are eitherÂ both oddÂ orÂ both even.

Find whether such distribution exists.

### Input Format

• The first line of input will contain a single integerÂ ďż˝, denoting the number of test cases.
• Each test case consists of multiple lines of input.
• The first line of each test case contains a single integerÂ ďż˝Â â€” the number of books.
• The next line containsÂ ďż˝Â space-separated integers, where theÂ ďż˝ďż˝â„ŽÂ integer denotes the number of pages in theÂ ďż˝ďż˝â„ŽÂ book.

### Output Format

For each test case, output on a new line,Â YES, if a valid distribution exists. Otherwise, printÂ NO.

You can print each character in uppercase or lowercase. For example,Â NO,Â no,Â No, andÂ nO, are all considered the same.

### Constraints

• 1â‰¤ďż˝â‰¤100
• 2â‰¤ďż˝â‰¤105
• 1â‰¤ďż˝ďż˝â‰¤100
• The sum ofÂ ďż˝Â over all test cases won’t exceedÂ 2â‹…105.

### Sample 1:

Input

Output

3
3
2 4 6
4
1 1 2 3
6
3 1 1 1 1 1

YES
NO
YES


### Explanation:

Test caseÂ 1:Â Consider the distribution where Alice gets booksÂ 1Â andÂ 3, and Bob gets the bookÂ 2. Thus, the number of pages allotted to Alice isÂ 2+6=8, and the number of pages allotted to Bob isÂ 4.
Thus, both Alice and Bob have even number of pages allotted to them.

Test caseÂ 2:Â It can be proven that there exists no valid distribution.

Test caseÂ 3:Â Consider the distribution where Alice gets the booksÂ 1,2,Â andÂ 3, and Bob gets the booksÂ 4,5,Â andÂ 6. Thus, the number of pages allotted to Alice isÂ 3+1+1=5, and the number of pages allotted to Bob isÂ 1+1+1=3.
Thus, both Alice and Bob have odd number of pages allotted to them.

## SOLUTION

Yhaa You have done it but next? if YOU Want to Get Others Please Visit HereÂ ScishowEngineerÂ Â  ThenÂ Follow US HEREÂ andÂ Join Telegram.