#include <bits/stdc++.h>

using namespace std;
typedef long long ll;
typedef long double lb;
#define rep(i, j, n) for (ll i = j; i < (n); i++)
#define repr(i, j, n) for (ll i = j; i >= (n); i--)
#define each(i, mp) for (auto &i : mp)
#define all(x) (x).begin(), (x).end()
#define CLR(mat, f) memset(mat, f, sizeof(mat))
#define IN(a, b, x) (a <= x && x < b)
#define out(ans) cout << ans << endl
typedef pair<ll, ll> P;
const lb pi = acos(-1);
const ll mod = 1e9 + 7;
const ll INF = 1LL << 60;


int main(){

    ll n;cin>>n;
    ll x[n],y[n];rep(i,0,n)cin>>x[i]>>y[i];

    bool ans=false;

    rep(i,0,n-2){
        rep(j,i+1,n-1){

            rep(k,j+1,n){
                lb xd1=x[j]-x[i],xd2=x[k]-x[i];
                lb yd1=y[j]-y[i],yd2=y[k]-y[i];

                if(xd1==0 and xd2==0)ans=true;
                else if(yd1/xd1==yd2/xd2)ans=true;

            }
        }
    }

    if(ans)out("Yes");
    else out("No");


    return 0;
}

#include <bits/stdc++.h>

using namespace std;
    
//#define endl '\n'
#define pb push_back
#define ll long long
#define int ll
#define FF first
#define SS second
#define f(a,b,c) for(int a=b;a<=c;a++)
#define fd(a,b,c) for(int a=b;a>=c;a--)
#define fspr(X) fixed<<setprecision(X)

int mod = 1000000007;

ll mod_pow(ll x, ll n, ll m = mod) {
	if (n < 0) {
		ll res = mod_pow(x, -n, m);
		return mod_pow(res, m - 2, m);
	}
	if (abs(x) >= m)x %= m;
	if (x < 0)x += m;
	ll res = 1;
	while (n) {
		if (n & 1)res = res * x % m;
		x = x * x % m; n >>= 1;
	}
	return res;
}

signed main()
{
	ios_base::sync_with_stdio(false);
    cin.tie(NULL);cout.tie(NULL);
    int T=1;//cin>>T;
   	while(T--)
    {
    	int n,m;cin>>n>>m;
    	int A[n],B[m];
    	f(i,0,n-1)cin>>A[i];f(i,0,m-1)cin>>B[i];
    	int i=0,j=0;
    	while(i<n || j<m){
    		if(i>=n){
    			while(j<m){
    				cout<<B[j]<<" ";j++;
				}
			}
			if(j>=m){
    			while(i<n){
    				cout<<A[i]<<" ";i++;
				}
			}
    		while(i<n && j<m && A[i]<B[j]){
    			cout<<A[i]<<" ";i++;
			}
			while(j<m && i<n && A[i]>B[j]){
				cout<<B[j]<<" ";j++;
			}
			while(i<n && j<m && A[i]==B[j]){
				i++;j++;
			}
		}
		cout<<endl;
    }
}