#include <bits/stdc++.h>
using namespace std;

int main(){
    int n;
    cin >> n;
    vector<pair<int, int>> p(n);
    for(auto& [x, y] : p) cin >> x >> y;
    for(int i = n; i--; ) for(int j = i; j--; ) for(int k = j; k--; ){
        auto [x1, y1] = p[i];
        auto [x2, y2] = p[j];
        auto [x3, y3] = p[k];
        x1 -= x3;
        x2 -= x3;
        y1 -= y3;
        y2 -= y3;
        if(x1 * y2 == x2 * y1){
            puts("Yes");
            return 0;
        }
    }
    puts("No");
}

#include<iostream>
#include<algorithm>
#include<string>
#include<vector>
#include<queue>
#include<set>
//#include<bits/stdc++.h>
#define int long long
constexpr long long mod = 1000000007;
#define for0(i, n) for(int i = 0; i < (n); i++)
#define for1(i, n) for(int i = 1; i <= (n);i++)
#define mp make_pair
#define all(x) x.begin(),x.end()
#define puts(x) cout << x << "\n"
using namespace std;
int input() {
	int r;
	cin >> r; //scanf("%lld", &r);
	return r;
}
int n, a[234567], ans;
signed main() {
	cin >> n; for0(i, n)cin >> a[i]; sort(a, a + n);
	for0(i, n - 1)ans += (a[i + 1] - a[i]) * (i + 1) * (n - i - 1);
	puts(ans);
}