#pragma comment(linker, "/STACK:1677721600") #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define sf scanf #define pf printf #define INF 0x3f3f3f3f #define mem0(a) memset(a,0,sizeof(a)) #define mem_1(a) memset(a,-1,sizeof(a)) #define FIN freopen("in.txt", "r", stdin) #define FOUT freopen("out.txt", "w", stdout) template inline bool in(T &ret) { char c; int sgn; if (c=getchar(),c==EOF) return 0; while (c!='-'&&(c<'0'||c>'9')) c=getchar(); sgn=(c=='-')?-1:1; ret=(c=='-')?0:(c-'0'); while(c=getchar(),c>='0'&&c<='9') ret=ret*10+(c-'0'); ret*=sgn; return 1; } template inline void out(T x) { if(x<0){ putchar('-'); x=-x; } if(x>9) out(x/10); putchar(x%10+'0'); } template T MAX(T a, T b) { return a > b ? a : b; } template T MIN(T a, T b) { return a < b ? a : b; } template T GCD(T a, T b) { return b ? GCD(b, a%b) : a; } template T LCM(T a, T b) { return a / GCD(a,b) * b; } typedef long long LL; typedef unsigned long long ULL; const int MAXN = 50 + 10; const int MAXM = 50 + 10; const double eps = 1e-8; LL MOD = 1000000007; int a,b,c; int re(int e){ return a*e*e+b*e+c; } int main(){ //FIN ; //FOUT; //cout<>T; while(T--){ int l,r; cin>>a>>b>>c>>l>>r; int ma=re(l); int mi=re(r); for(int i=l;i<=r;i++){ ma=MAX(ma,re(i)); mi=MIN(mi,re(i)); } cout<