#P10640. BZOJ2356 不等式
BZOJ2356 不等式
Problem Description
There are many inequalities in mathematics. For example, when :
You are given two homogeneous bivariate polynomials and , both with non-negative coefficients. Determine whether there exist such that for any , the following always holds: .
Input Format
The input contains multiple test cases. Adjacent test cases are separated by one blank line.
Each test case contains two lines.
The first line contains non-negative integers , where the are not all , representing .
The second line contains non-negative integers , where the are not all , representing .
Output Format
For each test case, output one line. If such exist, output YES; otherwise, output NO.
1 1 1
2 0 1 0
2 1 1 1
3 1 0 0 1
5 1 0 0 1 0 0
5 0 0 1 0 0 1
YES
YES
NO
Hint
Sample Explanation
- For the first sample, .
- For the second sample, . This is easy to verify after expansion.
- For the third sample, assume the opposite: holds for all positive . Let , then . If , the inequality fails when is large enough; if , the inequality fails when is small enough, so . Then let , we get , i.e., , which cannot hold for all positive . Therefore, such do not exist.
Constraints
There are at most test cases, and . The coefficients are at most .
Translated by ChatGPT 5