#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 1;
const int inf = 0x3f3f3f3f;
const double pi = acos(-1);
int read() {
  char c = getchar();
  int res = 0;
  while (c < '0' || c > '9') c = getchar();
  while (48 <= c && c <= 57) {
    res = res * 10 + c - '0';
    c = getchar();
  }
  return res;
}
bool bad(pair<double, double> A, pair<double, double> B, pair<double, double> C,
         bool t) {
  return B.first * (C.second - A.second) + C.first * (A.second - B.second) +
             A.first * (B.second - C.second) >=
         0;
}
void ConvexHull(vector<pair<double, double> > &p) {
  sort(p.begin(), p.end());
  vector<pair<double, double> > upper;
  upper.clear();
  vector<pair<double, double> > lower;
  lower.clear();
  for (int i = 0; i < p.size(); ++i) {
    while (upper.size() > 1) {
      int j = upper.size() - 2;
      if (bad(upper[j], upper[j + 1], p[i], 1))
        upper.pop_back();
      else
        break;
    }
    upper.push_back(p[i]);
  }
  reverse(p.begin(), p.end());
  for (int i = 0; i < p.size(); ++i) {
    while (lower.size() > 1) {
      int j = lower.size() - 2;
      if (bad(lower[j], lower[j + 1], p[i], 0))
        lower.pop_back();
      else
        break;
    }
    lower.push_back(p[i]);
  }
  p.clear();
  for (int i = 1; i < upper.size(); ++i) p.push_back(upper[i]);
  for (int i = 1; i < lower.size(); ++i) p.push_back(lower[i]);
}
double len(pair<double, double> u) {
  return sqrt(u.first * u.first + u.second * u.second);
}
double ang(pair<double, double> u, pair<double, double> v) {
  return acos((u.first * v.first + u.second * v.second) / len(u) / len(v));
}
void TransForm(vector<pair<double, double> > &P) {
  vector<pair<double, double> > C;
  C.clear();
  int n = P.size();
  for (int i = 0; i < n; ++i) {
    int j = (i + 2) % n;
    pair<double, double> u = {P[i].first - P[(i + 1) % n].first,
                              P[i].second - P[(i + 1) % n].second};
    pair<double, double> v = {P[j].first - P[(i + 1) % n].first,
                              P[j].second - P[(i + 1) % n].second};
    C.push_back({len(u), ang(u, v)});
  }
  P = C;
}
int n, m;
vector<pair<double, double> > A, B;
int KMP[N];
int main() {
  A.resize(read());
  B.resize(read());
  for (int i = 0; i < A.size(); ++i) A[i].first = read(), A[i].second = read();
  for (int i = 0; i < B.size(); ++i) B[i].first = read(), B[i].second = read();
  ConvexHull(A);
  TransForm(A);
  ConvexHull(B);
  TransForm(B);
  if (A.size() != B.size()) return printf("NO"), 0;
  int n = A.size();
  for (int i = 0; i < n; ++i) A.push_back(A[i]);
  KMP[0] = -1;
  for (int i = 1; i < n; ++i) {
    int j = KMP[i - 1];
    while (B[j + 1] != B[i]) {
      if (j >= 0)
        j = KMP[j];
      else {
        j = -2;
        break;
      }
    }
    KMP[i] = j + 1;
  }
  int len = -1;
  for (int i = 0; i < A.size(); ++i) {
    if (len == n - 1) {
      printf("YES");
      exit(0);
    }
    if (A[i] == B[len + 1])
      ++len;
    else if (len >= 0)
      len = KMP[len];
  }
  printf("NO");
}
