#include <bits/stdc++.h>   using namespace std;   int n, tx, ty;   vector<pair<int, int> > ar;   int vis[100010];   bool check(int first, int second, int x1, int y1, int x2, int y2) {     if ((1LL * x2 - 1LL * x1) * 1LL * (1LL * second - 1LL * y1) ==         (1LL * y2 - 1LL * y1) * 1LL * (1LL * first - 1LL * x1))       return true;     return false;   }   int main(int argc, char const *argv[]) {     scanf( %d , &n);     ar.clear();     for (int i = 0; i < n; i++) {       scanf( %d%d , &tx, &ty);       ar.push_back({tx, ty});     }     if (n == 1) {       cout <<  YES n ;     } else if (n == 2) {       cout <<  YES n ;     } else {       memset(vis, 0, sizeof(vis));       for (int i = 0; i < n; i++) {         if (check(ar[i].first, ar[i].second, ar[0].first, ar[0].second,                   ar[1].first, ar[1].second)) {           vis[i] = 1;         }       }       int x1, y1, x2, y2, flag = 0, hold1, hold2;       for (int j = 0; j < n; j++) {         if (!vis[j]) {           flag++;           x1 = ar[j].first;           y1 = ar[j].second;           vis[j] = 1;           hold1 = j;           break;         }       }       for (int j = 0; j < n; j++) {         if (!vis[j]) {           flag++;           x2 = ar[j].first;           y2 = ar[j].second;           int fgh = 1;           if (check(ar[0].first, ar[0].second, x1, y1, x2, y2) ||               check(ar[1].first, ar[1].second, x1, y1, x2, y2)) {             fgh = 0;             hold2 = j;             continue;           }           if (fgh) {             vis[j] = 1;             hold2 = j;           }           break;         }       }       vis[hold2] = 1;       if (flag == 0 || flag == 1) {         cout <<  YES n ;       } else {         for (int i = 0; i < n; i++) {           if (check(ar[i].first, ar[i].second, x1, y1, x2, y2)) {             vis[i] = 1;           }         }         flag = 0;         for (int i = 0; i < n; i++) {           if (!vis[i]) {             flag = 1;           }         }         if (!flag)           cout <<  YES n ;         else {           memset(vis, 0, sizeof(vis));           for (int i = 0; i < n; i++) {             if (check(ar[i].first, ar[i].second, ar[0].first, ar[0].second, x1,                       y1))               vis[i] = 1;             else if (check(ar[i].first, ar[i].second, ar[1].first, ar[1].second,                            x2, y2))               vis[i] = 1;           }           flag = 0;           for (int i = 0; i < n; i++) {             if (!vis[i]) {               flag = 1;             }           }           if (!flag) {             cout <<  YES n ;           } else {             memset(vis, 0, sizeof(vis));             for (int i = 0; i < n; i++) {               if (check(ar[i].first, ar[i].second, ar[0].first, ar[0].second, x2,                         y2))                 vis[i] = 1;               else if (check(ar[i].first, ar[i].second, ar[1].first, ar[1].second,                              x1, y1))                 vis[i] = 1;             }             flag = 0;             for (int i = 0; i < n; i++) {               if (!vis[i]) {                 flag = 1;               }             }             if (flag)               cout <<  NO n ;             else               cout <<  YES n ;           }         }       }     }     return 0;   }   