#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
#define mem0(a) memset(a,0,sizeof(a))
#define mem1(a) memset(a,-1,sizeof(a))
#define memf(a) memset(a,false,sizeof(a))
#define all(v) (v).begin(),(v).end()
#define lb lower_bound
#define ub upper_bound
#define pll pair<ll,ll>
#define mll map<ll,ll>
#define endl "\n"
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define DEC(x) fixed<<setprecision(x)
#define FAST ios_base::sync_with_stdio(0);cin.tie(NULL);cout.tie(NULL);
#define gcd(a,b) __gcd((a),(b))
#define lcm(a,b) ((a)*(b))/__gcd((a),(b))
const int M=1000000007;
const int MM=998244353;
const long double PI = acos(-1);
const long long INF=2e18;

template<typename T,typename T1>void amax(T &a,T1 b){if(b>a)a=b;}
template<typename T,typename T1>void amin(T &a,T1 b){if(b<a)a=b;}

ll power( ll b, ll e)
{
    if(e==0) return 1;
    if(e&1) return b*power(b*b,e/2);
    return power(b*b,e/2);
}
ll power(ll b,ll e,ll m)
{
    if(e==0) return 1;
    if(e&1) return b*power(b*b%m,e/2,m)%m;
    return power(b*b%m,e/2,m);
}
ll modinv(ll a,ll m)
{
    return power(a,m-2,m);
}

// #define _NCR_

int TLE_TERROR()
{
 	ll n,ans=0;
 	cin>>n;
 	ll a[n],b[n];
 	for(ll i=0;i<n;i++)
 		cin>>a[i];
 	for(ll i=0;i<n;i++)
 		cin>>b[i];
 	for(ll i=0;i<n;i++)
 	{
 		ans+=(a[i]*b[i]);
 	}
 	if(ans==0)
 		cout<<"Yes"<<endl;
 	else 
 		cout<<"No"<<endl;
 	
 	return 0;   
}

int main()
{
    FAST
    // freopen("input.txt","r",stdin);
    // freopen("output.txt","w",stdout);
    ll int TESTS=1;
    // cin>>TESTS;
    #ifdef _NCR_
        initialvalues();
    #endif
    while(TESTS--)
        TLE_TERROR();
    return 0;
}
#include <bits/stdc++.h>

using namespace std;

bool isCollinear(int x1, int y1, int x2,int y2, int x3, int y3) {
        int result = x1 * (y2 - y3) + x2 * (y3 - y1) + x3 * (y1 - y2);
        return result==0;
    }

int main() {
   
  int t; cin>>t;
  vector<pair<int, int>> points;
  while(t--)
  {
      int a , b; cin>>a>>b;
      
      points.push_back({a,b});
  }
  
  int n  = points.size();
  bool ok = false;
  for(int i = 0 ; i  <  n ; i++)
  {
      pair<int, int> p1 = points[i];
      for(int j = i+1 ; j < n ; j++)
      {
          pair<int, int> p2 = points[j];
          for(int k = j+1; k < n ; k++)
          {
              
              pair<int, int> p3 = points[k];
              if(isCollinear(p1.first, p1.second, p2.first, p2.second, p3.first, p3.second) == true)
              {
                  ok =true;
                  break;
              }
          }
          if(ok)
            break;
      }
    if(ok )
    break;
  }
    if(ok)
      cout<<"Yes\n";
      else
      cout<<"No\n";
}