#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; int main(){ int n; int firstx, firsty; string isSameX = "YES"; string isSameY = "YES"; cin >> n; if (n >= 2 && n <= 10) { for (int a0 = 0; a0 < n; a0++) { int x; int y; cin >> x >> y; if (x >= -10 && x <= 10 && y >= -10 && y <= 10) { if (a0 == 0) { firstx = x; firsty = y; } if (x != firstx) { isSameX = "NO"; } if (y != firsty) { isSameY = "NO"; } } } if (isSameX == "YES") { cout << isSameX; } else if (isSameY == "YES") { cout << isSameY; } else { cout << "NO"; } } return 0; }