#abc344c. C - A+B+C
C - A+B+C
Score: points
问题陈述
你已给出三个序列 , 和 。
另外,还给出一个序列 。对于每个 ,解决以下问题:
问题:是否可以从 、 和 中各选择一个元素,使得它们的和等于 ?
以上为通义千问 qwen-max 翻译,仅供参考。
Problem Statement
You are given three sequences , , and .
Additionally, a sequence is given. For each , solve the following problem:
Problem: Is it possible to select one element from each of , , and so that their sum is ?
Constraints
- All input values are integers.
Input
The input is given from Standard Input in the following format:
Output
Print lines. The -th line should contain Yes
if it is possible to select one element from each of , , and so that their sum is , and No
otherwise.
Sample Input 1
3
1 2 3
2
2 4
6
1 2 4 8 16 32
4
1 5 10 50
Sample Output 1
No
Yes
Yes
No
- It is impossible to select one element from each of , , and so that their sum is .
- Selecting , , and from , , and , respectively, makes the sum .
- Selecting , , and from , , and , respectively, makes the sum .
- It is impossible to select one element from each of , , and so that their sum is .