// // PointsOnALine.cpp // // // Created by Farbod Yadegarian on 2016-06-20. // // #include #include using namespace std; int x[100] , y[100]; int main() { int n; cin >> n; bool b = true; bool b2 = true; for(int i = 0;i < n;i ++) cin >> x[i] >> y[i]; for(int i = 0;i < n;i ++) for(int j = 0;j < n;j ++) { if(x[i] != x[j]) b = false; if(y[i] != y[j]) b2 = false; } if(b || b2) cout << "YES" << endl; else cout << "NO" << endl; return 0; }