#include #include using namespace std; using ll = long long; set> cords; constexpr int INF = 1e9+7; pair getK(pair a, pair b) { a.first -= b.first; a.second -= b.second; int g = __gcd(abs(a.first), abs(a.first)); if (g != 0) { a.first /= g; a.second /= g; } if (a.first == a.second && a.first==0) return{INF, INF}; if (a.first == 0) a.second = 1; if (a.second == 0) a.first = 1; return { a.first, a.second }; } int main() { ios_base::sync_with_stdio(false); cin.tie(nullptr); int n; cin >> n; pair point; while(n--) { cin >> point.first >> point.second; cords.insert(point); } pair k = getK(*cords.begin(), *cords.rbegin()); int check = 0; for (auto el: cords) { if (k != (getK(*cords.begin(), el)==make_pair(INF, INF)?k:getK(*cords.begin(), el))) { check = 1; break; } } check ? cout << "no" : cout << "yes"; return 0; }