CF2195A Sieve of Erato67henes

Description

You are given $ n $ positive integers $ a_1,a_2,\ldots,a_n $ . Please determine if it is possible to select any number of elements in $ a $ , so that their product is $ 67 $ . Note that you may not select zero elements, as the product of zero elements is not defined in this problem.

Input Format

Each test contains multiple test cases. The first line contains the number of test cases $ t $ ( $ 1 \le t \le 10^4 $ ). The description of the test cases follows. The first line of each test case contains a single integer $ n $ ( $ 1 \le n \le 5 $ ). The second line of each test case contains $ n $ positive integers $ a_1,a_2,\ldots,a_n $ ( $ 1 \le a_i \le 67 $ ).

Output Format

If it is possible to select elements so that their product is $ 67 $ , output "YES" on one line. Otherwise, output "NO" on one line. You can output the answer in any case. For example, the strings "yEs", "yes", and "Yes" will also be recognized as positive responses.

Explanation/Hint

In the first test case, you can select $ a_1 $ and $ a_5 $ to get $ a_1\cdot a_5 = 1 \cdot 67 = 67 $ . In the second test case, it is impossible to select any number of elements so that their product is $ 67 $ .