#include using namespace std; typedef long long ll; #define rep(i, n) for (ll i = 0; i < n; i++) #define all(v) v.begin(), v.end() typedef pair P; const ll MOD=1000000007; int main(){ ll a,b,c,d,p,q,ans,maxans,pnt,minans,pnt2; cin>>a>>b>>c>>d>>p>>q; maxans=-100000; minans=100000; for(ll i=p;i<=q;i++){ ans=a*i*i*i+b*i*i+c*i+d; if(ans>maxans){ maxans=ans; pnt=i; } if(ans