#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define mp make_pair
#define f first
#define s second
#define sz size()
#define ll long long
#define all(_v) _v.begin(), _v.end()
#define pii pair <int, int>
#define pll pair <ll, ll>
#define pvllvll pair <vector <ll>, vector <ll> >
#define ld long double
#define veci vector <int>
#define vecll vector <ll>


const int dx[4] = {1, -1, 0, 0};
const int dy[4] = {0, 0, -1, 1};
const double PI = 3.1415926535897932384626433832795;
const double eps = 1e-9;
const int MOD1 = 1e9 + 7;
const int MOD2 = 998244353;

void solve() {
    int n;
    cin >> n;
    vector <pii> a(n);
    for(auto &it : a) cin >> it.f >> it.s;
    for(int i = 0; i < n; ++i) {
        for(int j = i + 1; j < n; ++j) {
            for(int k = j + 1; k < n; ++k) {
                if((a[i].f - a[j].f) * (a[k].s - a[j].s) == (a[k].f - a[j].f) * (a[i].s - a[j].s)) {
                    cout << "Yes";
                    return;
                }
            }
        }
    }
    cout << "No";
}


int main() {
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    int T = 1;
    ///cin >> T;
    while(T--) solve(), cout << '\n';
    return 0;
}

#include <bits/stdc++.h>
#define FAST ios_base::sync_with_stdio(false);  cin.tie(NULL);
#define ll long long
#define min3(a,b,c) min(min((a),(b)),(c))
#define min4(a,b,c,d) min(min((a),(b)),min((c),(d)))
#define max3(a,b,c) max(max((a),(b)),(c))
#define max4(a,b,c,d) max(max((a),(b)),max((c),(d)))
#define S second
#define F first
#define pb push_back
#define mp make_pair
#define lb lower_bound
#define ub upper_bound
#define gcd(a,b) __gcd(a,b)
#define lcm(a,b) (a*b)/gcd(a,b)
#define PI 3.14159265358979323846;
#define MOD 1000000007
using namespace std;

int main()
{
    FAST;

    int n;
    cin >> n;

    vector <ll> v(n);

    ll s_a = 0;

    for(int i = 0; i < n; i++)
    {
        ll a, b;
        cin >> a >> b;

        s_a -= a;

        v[i] = 2 * a + b;
    }

    sort(v.rbegin(), v.rend());

    int c = 0;

    for(int i = 0; i < n; i++)
    {
        if(s_a > 0)
        {
            break;
        }

        s_a += v[i];

        c += 1;
    }

    cout << c << "\n";
    
    return 0;
}