#include #include using namespace std; #define pii pair #define F(i,a,b) for(ll i = (ll)(a); i <= (ll)(b); i++) #define RF(i,a,b) for(ll i = (ll)(a); i >= (ll)(b); i--) #define PI 3.14159265 #define ll long long #define f first #define s second #define pb(x) push_back(x) #define mp(x,y) make_pair(x,y) #define debug(x) cout << #x << " = " << x << endl #define INF 1000000009 #define mod 1000000007 int n; int main() { ios_base::sync_with_stdio(false); cin.tie(0); int x,y,px=0,py=0,x2,y2,flag=0,i; cin>>n; cin>>px>>py; if(px==0) { cin>>x>>y; if(n==2&&x==0) cout<<"YES"; else { for(i=2;i>x2>>y2; if(x2!=0) { flag=1; break; } } if(flag==1) cout<<"NO"; else cout<<"YES"; } } else if(py==0) { cin>>x>>y; if(n==2&&y==0) cout<<"YES"; else { for(i=2;i>x2>>y2; if(y2!=0) { flag=1; break; } } if(flag==1) cout<<"NO"; else cout<<"YES"; } } else {cin>>x>>y; if(n==2) cout<<"YES"; else { for(i=2;i>x2>>y2; if(!(x-px||(x2-x)==0)) {if(!((y-py)/(x-px)==(y2-y)/(x2-x))) { flag=1; break; } } else { if(y-py!=y2-y) { flag=1; break; } } } if(flag==1) cout<<"NO"; else cout<<"YES"; } } return 0; }