#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define endl "\n"
#define quick ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
#define ALL(x) x.begin(),x.end()
#define SORT(x) sort(ALL(x))
#define FOR(a,b,c) for(ll (a)= (b);(a)<(c);++(a))
#define REP(a,b) FOR(a,0,b)
#define mp make_pair
#define pb push_back
#define pll pair<ll,ll>
#define f first
#define s second
int ttt = 1, n, m;

template <class myType>
void print_arr(myType &arr, ll L, string sep){
    REP(i,L){
        cout << arr[i];
        if (i < L-1){
            cout << sep;
        }
    }
    cout << endl;
    return;
}

/*
If N == 1, obviously possible

Take points S0 and S1.
Iterate over T
for j in 1..n
for k in 1..n, j != k
Match S0 to Tj and S1 to Tk
If |S0 to S1| != |Tj to Tk|, continue
Else:
    work out x and y translation
    work out angle of rotation of
*/
int dist(pair<double,double> p1, pair<double,double> p2) {
    return (p1.f-p2.f)*(p1.f-p2.f) + (p1.s-p2.s)*(p1.s-p2.s);
}

void solve(){
    string YY = "Yes", NN = "No";
    cin >> n;
    vector< pair<double,double> > S(n), t(n);
    REP(i,n) cin >> S[i].f >> S[i].s;
    REP(i,n) cin >> t[i].f >> t[i].s;
    if (n == 1) {
        cout << YY << endl;
        return;
    }
    int x = 0, y = 0;
    REP(i,n) {
        x += S[i].f;
        y += S[i].s;
        S[i].f *= n;
        S[i].s *= n;
    }
    REP(i,n) {
        S[i].f -= x;
        S[i].s -= y;
    }
    x = 0, y = 0;
    REP(i,n) {
        x += t[i].f;
        y += t[i].s;
        t[i].f *= n;
        t[i].s *= n;
    }
    REP(i,n) {
        t[i].f -= x;
        t[i].s -= y;
    }
    REP(i,n) {
        if (S[i].f != 0 || S[i].s != 0) {
            swap(S[i],S[0]);
        }
    }
    double tol = 0.000001;
    REP(i,n) {
        double angle = atan2(t[i].s,t[i].f) - atan2(S[0].s,S[0].f);
        bool flag = 1;
        REP(j,n) {
            double A = S[j].f*cos(angle) - S[j].s*sin(angle);
            double B = S[j].f*sin(angle) + S[j].s*cos(angle);
            bool flag2 = 0;
            REP(k,n) if (std::abs(A - t[k].f) <= tol && std::abs(B - t[k].s) <= tol) flag2 = 1;
            flag &= flag2;
        }
        if (flag) {
            cout << YY << endl;
            return;
        }
    }
    cout << NN << endl;
    return;
}


int main(){  
    quick;
    //cin >> ttt;
    while (ttt--) solve();
    return 0;
}

#include <iostream>

using namespace std;

int main() {
  long N, M, T;
  cin >> N >> M >> T;
  long n = N, offset = 0;
  for (int i = 0; i < M; i++) {
    long A, B;
    cin >> A >> B;
    offset = A - offset;
    n -= offset;
    if (n <= 0) {
      cout << "No" << endl;
      return 0;
    };
    n += B - A;
    if (n >= N) n = N;
    offset = B;
  }
  n -= (T - offset);
  if (n <= 0) cout << "No" << endl;
  else        cout << "Yes" << endl;
  return 0;
}