a,b,c,d,p,q=map(int,input().split()) f=lambda x:a*x*x*x+b*x*x+c*x+d inf=float("inf") M=inf N=-inf X,Y=0,0 for x in range(p,q+1): h=f(x) if h