SP17143 PSYCHO3 - Make Psycho
Description
**Problem Statement**:
```
The number N is called Psycho Number . Psycho Number is calculated as follows:
First, If we factorize N , then we have some prime and their power. Assume that, there are M powers. From M powers , you should count the number of even and odd powers. Then if the number of even power is strictly greater than odd power , then we call the number N is “Psycho Number”, otherwise the number N is call “Ordinary Number”.
As for example, if N = 67500 then prime factorization, 67500 = 22 x 33 x 54. Count even powers and odd powers . This number have 2 even power(2,4) and 1 odd power ( 3 ). Since even power 2 (2,4) is greater than odd power 1 (3), so the number 67500 is a Psycho Number.
```
Now, Given an integer **K**, your task is to find whether it is possible to form a subset consisting of only psycho numbers that sum up to exactly **K**, or not.
**Input**:
The first line of the input contains an integer, **T** (1 T N (1 N K (1 K . The second line of each test case contains the sequence of integers p $ _{1} $ , p $ _{2} $ , ..., p $ _{n} $ (0
**Output:**
For each case print “**Yes**” if possible to make **K** . otherwise “**No**”.
```
Sample Input/Output:
Sample Input
Sample Output
3
5 20
4 5 12 20 16
5 3
3 5 9 2 7
3 24
4 4 16
Yes
No
Yes
Explanation :
1st test case : psycho numbers : 4 and 16 .
possible number: 4, 16 and 20 (4+16).
k is 20 so you can make this number .
2nd test case : psycho numbers : only 9
k is 3 but it's not possible to make subset of psycho numbers which sum is equal to k .
3rd test case : psycho numbers : 4 4 16
possible number : 4 , 16 , 20(16+4) and 24 (16+4+4)
k is 24 so you can make this number .
Note : 0 and 1 is not a psycho number .
Psycho 1 : Psycho
Psycho 2 : Psycho Function
```
```
Problem setter: Shipu Ahamed, Dept. of CSE
Bangladesh University of Business and Technology (BUBT)
```
Input Format
N/A
Output Format
N/A