#ABC474D. 总重压制 / Outweigh
总重压制 / Outweigh
Problem Statement
There are types of stones, . Stones of the same type all have the same weight. Takahashi and Aoki have and stones of type , respectively. Determine whether there exists a sequence of positive integers satisfying the following conditions, and if it exists, construct one such sequence.
- If the weight of a type- stone is , the total weight of the stones Takahashi has is strictly greater than the total weight of the stones Aoki has.
Constraints
- All input values are integers.
Input
The input is given from Standard Input in the following format:
Output
If there exists satisfying the conditions, output it in the following format:
Yes
If there is no satisfying the conditions, output No in one line.
3
4 7 4
5 5 5
Yes
4 7 4
If , the total weight of the stones Takahashi has is . The total weight of the stones Aoki has is .
3
3 3 3
4 7 4
No
1
2
2
No
- Source: AtCoder ABC 474 D
相关
在下列比赛中: