#include <bits/stdc++.h>
#define pi acos(-1)
#define fastcin ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
using namespace std;
typedef long long LL;
typedef pair<int, int> P;
const int INF = 0x3f3f3f3f;
const LL ll_INF = 0x3f3f3f3f3f3f3f3f;
const int maxn =100000 + 10;
const LL mod = 1e9+7;
int n, px[maxn], py[maxn], line1[maxn];
void test()
{
for(int i=1; i<=n; i++) printf("%d ", line1[i]);
puts("");
}
bool check(int a, int b)
{
memset(line1, 0, sizeof(line1));
int dx = px[a]-px[b];
int dy = py[a]-py[b];
line1[a]=1; line1[b]=1;
for(int i=1; i<=n; i++){
if(dx*(LL)(py[a]-py[i]) == dy*(LL)(px[a]-px[i])) line1[i]=1;
}
bool ans=true;
for(int i=1; i<=n; i++)if(!line1[i]){
for(int j=i+1; j<=n; j++)if(!line1[j]){
dx = px[i]-px[j];
dy = py[i]-py[j];
for(int k=j+1; k<=n; k++) if(!line1[k] && (dx*(LL)(py[i]-py[k]) != dy*(LL)(px[i]-px[k]))) ans = false;
return ans;
}
}
}
int main()
{
scanf("%d", &n);
for(int i=1; i<=n; i++) scanf("%d%d", &px[i], &py[i]);
if(n<=4) { printf("YES\n"); return 0; }
if(check(1, 2) || check(1, 3) || check(2, 3)) printf("YES\n");
else printf("NO\n");
}