// Etavioxy
#include<cstdio>
#include<cctype>
#include<cstring>
#include<iostream>
#include<algorithm>
#include<cmath>
#include<vector>
#define il inline
#define ll long long
#define rep(i,s,t) for(register int i=(s);i<=(t);i++)
#define rev_rep(i,s,t) for(register int i=(s);i>=(t);i--)
#define each(i,u) for(int i=head[u];i;i=bow[i].nxt)
#define file(s) freopen(s".in" ,"r",stdin),freopen(s".out","w",stdout)
#define pt(x) putchar(x)
using namespace std;
il int ci(){
	register char ch;int f=1;
	while(!isdigit(ch=getchar()))f=ch=='-'?-1:1;
	register int x=ch^'0';
	while(isdigit(ch=getchar()))x=(x*10)+(ch^'0');
	return f*x;
}

#define double unsigned ll

enum{N=104};

struct P{
	double x,y;
	bool operator==(const P&e)const{ return x==e.x&&y==e.y; }
	bool operator<(const P&e)const{ if( x!=e.x ) return x<e.x; return y<e.y; }
};
il P operator+(const P&a,const P&b){ return (P){a.x+b.x,a.y+b.y}; }
il P operator-(const P&a,const P&b){ return (P){a.x-b.x,a.y-b.y}; }
il P operator*(const P&a,const double b){ return (P){a.x*b,a.y*b}; }
il double dot(const P&a,const P&b){ return a.x*b.x+a.y*b.y; }
il double cross(const P&a,const P&b){ return a.x*b.y-a.y*b.x; }
il double dist(const P&a,const P&b){ return sqrt(dot(a-b,a-b)); }

P d0[N],d1[N];

int main(){
	int n = ci();
	if( n==1 ){ cout<<"Yes"<<endl; return 0; }
	rep(i,1,n) d0[i] = (P){(double)((ll)ci()),(double)((ll)ci())};
	rep(i,1,n) d1[i] = (P){(double)((ll)ci()),(double)((ll)ci())};
	P a0 = d0[2]-d0[1];
	P a1 = (P){a0.y,-a0.x};
	double x1 = 0, x2 = 0, x3 = 0;
	rep(i,1,n){
		double x = dot(d0[i]-d0[1],a0)*(double)(1e9+7)+dot(d0[i]-d0[1],a1);
		x1 += x;
		x2 += x*x*x*x;
		x3 += x*x*x;
	}
//	printf("x123 %llu %llu %llu\n",x1,x2,x3);
	rep(i,1,n){
		rep(j,1,n) if( i!=j ){
			a0 = d1[j]-d1[i];
			a1 = (P){a0.y,-a0.x};
			double y1 = 0, y2 = 0, y3 = 0;
			rep(k,1,n){
				double x = dot(d1[k]-d1[i],a0)*(double)(1e9+7)+dot(d1[k]-d1[i],a1);
				y1 += x;
				y2 += x*x*x*x;
				y3 += x*x*x;
			}
//			printf("%d %d : \n",i,j);
//			printf("y123 %llu %llu %llu\n",y1,y2,y3);
			if( x1==y1 && x2==y2 && x3==y3 ){
				cout<<"Yes"<<endl;
				return 0;
			}
		}
	}
	cout<<"No"<<endl;
	return 0;
}

#include <bits/stdc++.h>
// #include <atcoder/all>
#define FOR(i, a, n) for(ll i = (ll)a; i < (ll)n; i++)
#define FORR(i, n) for(ll i = (ll)n - 1LL; i >= 0LL; i--)
#define rep(i, n) FOR(i, 0, n)
#define ALL(x) begin(x), end(x)
using namespace std;
using ll = long long;
constexpr ll Mod = 998244353;
constexpr ll mod = 1e9 + 7;
constexpr ll inf = 1LL << 60;
const double PI = acos(-1);
template <typename T1, typename T2>
inline bool chmax(T1 &a, T2 b) {
    return a < b && (a = b, true);
}
template <typename T1, typename T2>
inline bool chmin(T1 &a, T2 b) {
    return a > b && (a = b, true);
}
/*-------------------------------------------*/
 
int main() {
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
 
    int n;
    cin >> n;
    vector<int> p(n);
    rep(i, n) cin >> p[i];
 
    vector<int> ans, used(n);
 
    FOR(i, 1, n) {
        int j = i;
        while(j > 0 && p[j - 1] > p[j]) {
            swap(p[j - 1], p[j]);
            if(used[j]) {
                cout << -1 << endl;
                return 0;
            }
            ans.push_back(j);
            used[j] = 1;
            j--;
        }
    }
 
    if((int)ans.size() != n - 1) {
        cout << -1 << endl;
        return 0;
    }
 
    rep(i, n - 1) cout << ans[i] << endl;
 
    return 0;
}