in country live wizard they love build city roadsThe country k city jth city 1jk locate point xj yj it decide create nk city and ith kin create point coordinate xi yi xiaxi1bmod1099 yicyi1dmod1099 here b c d prime also acbdafter construction n city wizard notice surprising it turn different city j xixj yiyj holdsthe city build time build road it decide use difficult course powerful spell construction road use spell create road town u v yu yv city w lie strictly inside corner point u v city s lie corner locate xcoordinate strictly w u simultaneously ysyvA corner point p2x2 y2 p1x1 y1 y1y2 set point xy condition fulfil minx1x2xmaxx1x2 yy1 y1yy2 xx2x1x20 the picture show different corner in order test spell wizard apply city lie xcoordinate interval LR after construction road national government wants choose maximum number pair city connect road city occur pair your task m offer variant value L R calculate maximum number pair construction road please note city lie interval LR xcoordinate affect construction road way