#include #include #include #include #include #include #include #include typedef long long int ll; typedef unsigned long ul; typedef long double ld; using std::cin; using std::cout; using std::cerr; using std::clog; using std::priority_queue; using std::stack; using std::vector; using std::string; vector &split(const string &s, char delim, vector &elems) { std::stringstream ss(s); std::string item; while (std::getline(ss, item, delim)) { elems.push_back(item); } return elems; } vector split(const string &s, char delim) { vector elems; split(s, delim, elems); return elems; } class Point { public: int x; int y; }; int main() { std::ios::sync_with_stdio(false); int n; cin >> n; Point* points = new Point[n + 1]; for(int i = 1; i <= n; i++) { cin >> points[i].x >> points[i].y; } Point vector; vector.x = points[2].x - points[1].x; vector.y = points[2].y - points[1].y; bool success = true; for (int i = 2; i <= n; i++) { if (points[i].x != points[1].x && points[i].y != points[1].y) { success = false; break; } } if (success) { cout << "YES" << "\n"; } else { cout << "NO" << "\n"; } delete[] points; return 0; }