#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; int x; int y; int old_x,old_y; int old_slope,new_slope; int flag=1; for(int a = 0; a < n; a++) { cin >> x >> y; if(a>=1) { if((x-old_x)!=0) new_slope=(y-old_y)/(x-old_x); else new_slope=abs(y-old_y); if(a>=2) { if(new_slope!=old_slope) { flag=0; } } old_slope=new_slope; } old_x=x; old_y=y; } if(flag) cout<<"YES"; else cout<<"NO"; return 0; }