#include using namespace std; typedef long long ll; typedef pair pii; typedef pair pll; typedef vector vii; typedef vector vll; #define X first #define Y second #define rep(i,n) for(ll i=0; i<(n); i++) #define repp(i,a,b) for(ll i=a; i<=(b); i++) #define repp2(i,b,a) for(ll i=b; i>=(a); i--) #define fill(a,val) memset(a, (val), sizeof(a)) #define mp make_pair #define pb push_back #define all(c) (c).begin(), (c).end() #define uni(c) c.resize(distance(c.begin(), unique(all(c)))) #define io ios_base::sync_with_stdio(false);cin.tie(NULL); #define IO(input_file_name) ifstream cin(input_file_name);ofstream cout("output.txt") #define sc(num) scanf("%d",&num) //#define ONLINE #ifdef ONLINE FILE *fin = freopen("great.in","r",stdin); FILE *fout = freopen("great.out","w",stdout); #endif ll mod= 1e9 + 7, mod1=1e9+9; int main() { io; pii a[100]; int n; cin>>n; rep(i,n){ cin>>a[i].X>>a[i].Y; } sort(a,a+n); int x1,y1,fl=0,zl=0; rep(i,n-1){ int x=a[i+1].Y-a[i].Y; int y=a[i+1].X-a[i].X; if(x<0)x*=-1,y*=-1; int g=1; if(x!=0 && y!=0)g=__gcd(abs(x),abs(y)); x/=g,y/=g; if(x==0 && y==0)continue; else if(x==0)y=1; else if(y==0)x=1; if(x!=0 && y!=0)fl=1; if(zl==0)x1=x,y1=y,zl=1; else{ if(x!=x1 || y!=y1)fl=1; } } if(fl)cout<<"NO"; else cout<<"YES"; return 0; }