#include using namespace std; struct Rect{ int64_t x0,y0,x1,y1; }; int main(){ int n; cin>>n; vector r(n); for (auto &i: r){ cin>>i.x0>>i.y0>>i.x1>>i.y1; assert(i.x1>0 and i.y1>0); i.x1+=i.x0; i.y1+=i.y0; } // Check area of overall bounding box matches combined area of bricks. Rect overall=r[0]; int64_t area=0; for (auto const &i: r){ overall.x0=min(overall.x0,i.x0); overall.x1=max(overall.x1,i.x1); overall.y0=min(overall.y0,i.y0); overall.y1=max(overall.y1,i.y1); area+=(i.x1-i.x0)*(i.y1-i.y0); } if ((overall.x1-overall.x0)*(overall.y1-overall.y0)!=area){ cout<<"no"<