http://acm.hdu.edu.cn/showproblem.php?pid=7127
#include<bits/stdc++.h>
using namespace std;
#define int long long
signed main()
{
int T;
cin>>T;
while(T--)
{
int a,b,c;
cin>>a>>b>>c;
int x0,x1,y0,y1,y2;
cin>>x0>>x1>>y0>>y1>>y2;
int res1=x0*x0*a+x0*b+c;
int x=2*x1-x0;
int res2=x*x*a+x*b+c;
int res3=x1*x1*a+x1*b+c;
if(res1>y0&&res2<y0&&res3!=y0&&res3<=y2)
{
puts("Yes");
}
else puts("No");
}
return 0;
}