#include #include using namespace std; int main() { int t,x1,x2,y1,y2,x,y; bool ans=true; scanf("%d",&t); scanf("%d %d %d %d",&x1,&y1,&x2,&y2); t-=2; while(t--) { scanf("%d %d",&x,&y); int k1=(y-y1)*(x2-x1),k2=(x-x1)*(y2-y1); if(k1!=k2) ans=false; } if(ans&&(y2-y1==0||x2-x1==0)) printf("YES"); else printf("NO"); return 0; }