struct node { ll w,h; node(){w=0,h=0;} node(ll w,ll h):w(w),h(h){} bool operator <(const node &a)const{return a.w==w?h>a.h:w>a.w;} }