#P10640. BZOJ2356 不等式

BZOJ2356 不等式

Problem Description

There are many inequalities in mathematics. For example, when x,y>0x,y>0:

x2+y2≥2xyx^2+y^2 \geq 2xy x3+y3≥x2y+xy2x^3+y^3 \geq x^2y+xy^2

You are given two homogeneous bivariate polynomials f(x,y)f(x,y) and g(x,y)g(x,y), both with non-negative coefficients. Determine whether there exist A,r>0A,r>0 such that for any x,y>0x,y>0, the following always holds: f(x,y)≥Ag(x,y)rf(x,y)\geq Ag(x,y)^r.

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 n+2n+2 non-negative integers n,a0,a1,…,ann,a_0,a_1,\dots,a_n, where the aia_i are not all 00, representing f(x,y)=a0xn+a1xn−1y+⋯+anynf(x,y)=a_0x^n+a_1x^{n-1}y+\dots+a_ny^n.

The second line contains m+2m+2 non-negative integers m,b0,b1,…,bmm,b_0,b_1,\dots,b_m, where the bib_i are not all 00, representing g(x,y)=b0xm+b1xm−1y+⋯+bmymg(x,y)=b_0x^m+b_1x^{m-1}y+\dots+b_my^m.

Output Format

For each test case, output one line. If such A,rA,r 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, x+y≥2xyx+y \geq \sqrt{2xy}.
  • For the second sample, x2+xy+y2≥(x3+y3)23x^2+xy+y^2\geq \sqrt[3]{(x^3+y^3)^2}. This is easy to verify after expansion.
  • For the third sample, assume the opposite: x5+x2y3≥A(x3y2+y5)rx^5+x^2y^3 \geq A(x^3y^2+y^5)^r holds for all positive x,yx,y. Let x=yx=y, then 2x5≥A(2x5)r2x^5\geq A(2x^5)^r. If r>1r>1, the inequality fails when xx is large enough; if r<1r<1, the inequality fails when xx is small enough, so r=1r=1. Then let x=1x=1, we get 1+y3≥A(y2+y5)1+y^3 \geq A(y^2+y^5), i.e., 1≥Ay21\geq Ay^2, which cannot hold for all positive yy. Therefore, such A,rA,r do not exist.

Constraints

There are at most 100100 test cases, and 1≤n,m≤1001\leq n,m\leq 100. The coefficients are at most 10410^4.

Translated by ChatGPT 5