#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; const int MaxN = 1e5 + 10; const int MOD = 1e9 + 7; const int INF = 1e9; int x[MaxN], y[MaxN]; int cw(int i, int j, int k) { return (x[i] - x[j]) * (y[k] - y[j]) - (x[k] - x[j]) * (y[i] - y[j]); } int main() { // freopen("input.txt", "r", stdin); int n; cin >> n; for (int i = 0; i < n; ++i) { cin >> x[i] >> y[i]; } bool okl = true, okr = true; if (n > 1) { for (int i = 0; i < n; ++i) { okl &= x[i] == x[0]; okr &= y[i] == y[0]; } } if (okl || okr) cout << "YES"; else cout << "NO"; return 0; }