#include using namespace std; using ll=long long; #define rep2(i, a, n) for(int i = (a); i < (n); i++) #define rep(i, n) rep2(i,0,n) int main(){ cin.tie(nullptr);ios_base::sync_with_stdio(false); ll a,b,c,d,p,q; cin>>a>>b>>c>>d>>p>>q; //最大値を $M$、最小値を $m$ //最大値の $x$ 座標を $X_M$、最小値の $x$ 座標を $X_m$ ll hoge,s=-1e9,t,u=1e9,v,l,m; for(int x=p;xs){ s=hoge; t=x; } if(hoge