#include <bits/stdc++.h>
using namespace std;
using vi = vector<int>;
using vb = vector<bool>;
using vl = vector<long>;
using vs = vector<string>;
using vvi = vector<vector<int>>;
using vvb = vector<vector<bool>>;
using vvc = vector<vector<char>>;
using vvl = vector<vector<long>>;
using pii = pair<int, int>;
using pil = pair<int, long>;
using pll = pair<long, long>;
#define fix20 cout << fixed << setprecision(20)
#define YES cout << "Yes" << endl
#define NO cout << "No" << endl
#define rep(i,n) for(long i=0; i<(long)(n);i++)
#define REP(i,s,t) for(long i=s; i<t; i++)
#define RNG(i,s,t,u) for(long i=s; i<t; i+=u)
#define MOD 1000000007
#define all(vec) vec.begin(), vec.end()
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }

int main(){
  long n;
  cin >> n;
  vector<pll> d(n);
  //cout << n << endl;
  rep(i,n){
    cin >> d.at(i).first >> d.at(i).second;
  }
  sort(all(d));
  long ans = 0;
  //cout << n << endl;
  rep(i,n){
    REP(j,i+1,n){
      long xs = d.at(i).first;
      long ys = d.at(i).second;
      long xt = d.at(j).first;
      long yt = d.at(j).second;
      long xv = xt - xs;
      long yv = yt - ys;
      REP(k,j+1,n){
        long xm = d.at(k).first;
        long ym = d.at(k).second;
        //cout << xs << ys << xt << yt << xm << ym << endl;
        //cout << xv << yv << endl;
        if(xv == 0){
          if(xm == xs) {
            //cout << xs << ys << xt << yt << xm << ym << endl;
            ans++;
          }
        }else{
          if((xm - xs) * yv % xv != 0) continue;
          long cy = ys + (xm - xs) * yv / xv;
          if(cy == ym){
            ans++;
          }
        }
      }
    }
  }
  if(ans > 0) YES;
  else NO;
}
#include <bits/stdc++.h>
using namespace std;
#include <algorithm>
#define ll long long int
#define pb push_back
#define fo(i, n) for (int i = 0; i < n; i++)
#define vct vector<long long int>
const ll INF = 1e18;
const ll NINF = -1e18;
#define f first
#define s second
int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    ll n, m;
    cin >> n >> m;
    vector<ll> v, v1;
    for (int i = 0; i < n; i++)
    {
        ll a;
        cin >> a;
        v.pb(a);
    }
    for (int i = 0; i < m; i++)
    {
        ll b;
        cin >> b;
        v1.pb(b);
    }
    vector<ll> v2;
    if (m > n)
    {

        for (int i = 0; i <n; i++)
        {
              auto it = find(v1.begin(), v1.end(), v[i]);
              if(it ==v1.end()){
                  v2.pb(v[i]);
              }
              else{
                  v1.erase(it);
              }
        }
        v2.insert(v2.end(), v1.begin(), v1.end());
        sort(v2.begin(), v2.end());
        for (int i = 0; i < v2.size(); i++)
        {
            cout<<v2[i]<<" ";
        }
        
    }
    else{
       for (int i = 0; i <m; i++)
        {
              auto it = find(v.begin(), v.end(), v1[i]);
              if(it ==v.end()){
                  v2.pb(v1[i]);
              }
              else{
                  v.erase(it);
              }
        }
        // cout<<v2.size()<<endl;
        v2.insert(v2.end(), v.begin(), v.end());
        sort(v2.begin(), v2.end());
        for (int i = 0; i < v2.size(); i++)
        {
            cout<<v2[i]<<" ";
        }

    }

    return 0;
}