P,Q,R=map(int,input().split()) A,B,C=map(int,input().split()) mx=min(A*P,(A+B)*Q,(A+B+C)*R) mn=max((A-1)*P+1,(A+B-1)*Q+1,(A+B+C-1)*R+1) if mx