#include<iostream>
#include<set>
using namespace std;

struct Da{
    int x , y;
    int dot , tim;
    int dc(Da b){
       return x * b.x + y * b.y; 
    }
    int tc(Da b){
        return x * b.y - y * b.x;
    }
};


int main(){
    #ifdef LOCAL
    freopen("input.txt" , "r" , stdin);
    #endif
    int n ; Da a[110] , b[110];
    cin >> n;
    for(int i = 0 ; i < n ; i ++ ) cin >> a[i].x >> a[i].y ;
    for(int i = 0 ; i < n ; i ++ ) cin >> b[i].x >> b[i].y;
    for(int i = n ; i > 0 ; i -- ) a[i].x -= a[0].x , a[i].y -= a[0].y;
    set<pair<int,int>> s;
    if(n == 1){
        puts("Yes");
        return 0;
    }    
    for(int i = 2 ; i < n ; i ++ ){
        s.insert({a[1].dc(a[i]) ,a[1].tc(a[i])});
    }
    // cout << "*" << endl;
    // for(auto it : s){
    //     cout << it.first << " " << it.second << endl;
    // }
    for(int i = 0 ; i < n ; i ++ ){
        for(int j = 0 ; j < n ; j ++ ){
            if(i == j) continue;
            int dx = b[i].x - b[j].x , dy = b[i].y - b[j].y;
            if(dx * dx + dy * dy != a[1].x * a[1].x + a[1].y * a[1].y) continue;
            bool f = 1;
            for(int k = 0 ; k < n ; k ++ ) if(k != i)b[k].x -= b[i].x , b[k].y -= b[i].y;
            b[i].x = b[i].y = 0;
            for(int k = 0 ; k < n ; k ++ ){
                if(k == i || k == j) continue;
                if(!s.count({b[j].dc(b[k]) , b[j].tc(b[k])})){
                    f = 0;
                    break;
                }
            }
            if(f){
                puts("Yes");
                return 0;
            }
        }
    }
    puts("No");
    return 0;
}
#include<iostream>
#include<string>
#include<algorithm>
using namespace std;
int n;
const int N=1e6;
struct moun{
    int a;
    string b;
}a[N];
bool cmp(moun a,moun b){
    return a.a<b.a;
}
int main(){
    cin>>n;
    for(int i=1;i<=n;i++)
        cin>>a[i].b>>a[i].a;
    sort(a+1,a+1+n,cmp);
    cout<<a[n-1].b<<endl;
    // system("pause");
}