E. Polycarp's New Job

int main(){
    // input
    ll LOOP; 
    cin>>LOOP;
    
    // bill
    ll ma_x = 0;
    ll ma_y = 0;

    while(LOOP--){
      char type;cin>>type;
      if(type=='+'){
        ll x,y;cin>>x>>y;
        if(x>y) swap(x,y);
        chmax(ma_x, x);
        chmax(ma_y, y);
      }
      else{
        ll h,w;cin>>h>>w;
        if(h>w) swap(h,w);
        if(h>=ma_x && w>=ma_y){
          p_yes();
        }else{
          p_no();
        }
      }
    }
    
    return 0;
}