#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; int main(){ int n; cin >> n; bool line1=true; int x1,y1; for(int a0 = 0; a0 < n; a0++){ int x; int y; cin >> x >> y; if(a0>0 && !((x1-x==0 && y1-y!=0) || (x1-x!=0 && y1-y==0))) { line1=false; } x1=x;y1=y; } if(line1) cout<<"YES"<