#include <bits/stdc++.h>
using namespace std;

int M;
struct modint {

  int val = 0;

  modint() {}

  modint(int a) : val(a) {
    while (val < 0) {
      val += M;
    }
    while (val >= M) {
      val -= M;
    }
  }

  modint(long long a) : val(a % M) {
    if (val < 0) {
      val += M;
    }
  }

  modint operator+=(modint oth) {
    val += oth.val;
    if (val >= M) {
      val -= M;
    }
    return *this;
  }

  modint operator-=(modint oth) {
    val -= oth.val;
    if (val < 0) {
      val += M;
    }
    return *this;
  }

  modint operator*=(modint oth) {
    val = 1LL * val * oth.val % M;
    return *this;
  }

  void operator++() {
    ++val;
    if (val == M) {
      val = 0;
    }
  }

  void operator--() {
    --val;
    if (val == -1) {
      val = M - 1;
    }
  }

  modint operator-() {
    modint res;
    res.val = (val == 0) ? 0 : M - val;
    return res;
  }

  int mod() {
    return M;
  }

  modint pow(int e) {
    modint base = val;
    modint res = 1;
    while (e > 0) {
      if (e % 2 == 1) {
        res *= base;
      }
      base *= base;
      e /= 2;
    }
    return res;
  }

  modint inv() {
    return pow(M - 2);
  }

  friend modint operator+(modint a, modint b) {
    return modint(a) += b;
  }

  friend modint operator-(modint a, modint b) {
    return modint(a) -= b;
  }

  friend modint operator*(modint a, modint b) {
    return modint(a) *= b;
  }

  friend bool operator==(modint a, modint b) {
    return a.val == b.val;
  }

  friend bool operator!=(modint a, modint b) {
    return a.val != b.val;
  }

};

using mint = modint;
const int N = 100;
const int K = 1'000'000;

mint ways[N][K];

int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);

  int n, m;
  cin >> n >> m >> M;

  ways[0][0] = 1;
  for (int i = 1; i < n; ++i) {
    for (int j = 0; j < K; ++j) {
      int prv = j - i;
      int prv_prv = j - i * (m + 1);

      ways[i][j] = ways[i - 1][j];
      if (prv >= 0) {
        ways[i][j] += ways[i][prv];
        if (prv_prv >= 0) {
          ways[i][j] -= ways[i - 1][prv_prv];
        }
      }
    }
  }

  for (int i = 0; i < n; ++i) {
    mint ans = 0;
    for (int j = 0; j < K; ++j) {
      ans += ways[i][j] * ways[n - i - 1][j];
    }
    cout << (ans * (m + 1) - 1).val << "\n";
  }
}

#include <bits/stdc++.h>
// #include <atcoder/all>
// using namespace atcoder;
#define rep(i, n) for (ll i = 0; i < (ll)(n); ++i)
#define rep2(i, s, n) for (ll i = s; i < (ll)(n); i++)
#define repr(i, n) for (ll i = n; i >= 0; i--)
#define pb push_back
#define COUT(x) cout << (x) << "\n"
#define COUTF(x) cout << setprecision(15) << (x) << "\n"
#define ENDL cout << "\n"
#define DF(x) x.erase(x.begin())
#define ALL(x) x.begin(), x.end()
#define SORT(x) sort(ALL(x))
#define RSORT(x) sort(x.rbegin(), x.rend())
#define REVERSE(x) reverse(ALL(x))
#define MAX(x) *max_element(ALL(x))
#define MAXI(x) max_element(ALL(x)) - x.begin()
#define SUM(x) accumulate(ALL(x), 0ll)
#define COUNT(x, y) count(ALL(x), y);
#define ANS cout << ans << "\n"
#define YES cout << "YES\n";
#define NO cout << "NO\n";
#define Yes cout << "Yes\n";
#define No cout << "No\n";
#define init() \
  cin.tie(0);  \
  ios::sync_with_stdio(false)
#define debug(x) cerr << "[debug] " << #x << ": " << x << endl;
#define debugV(v)                       \
  cerr << "[debugV] " << #v << ":";     \
  rep(z, v.size()) cerr << " " << v[z]; \
  cerr << endl;
using namespace std;
using ll = long long;
using ld = long double;
using vll = vector<ll>;
using vvll = vector<vector<ll>>;
using mll = map<ll, ll>;
using qll = queue<ll>;
using P = pair<ll, ll>;
using vp = vector<P>;
using vs = vector<string>;

template <typename T>
inline istream& operator>>(istream& i, vector<T>& v) {
  rep(j, v.size()) i >> v[j];
  return i;
}

template <typename T1, typename T2>
inline istream& operator>>(istream& i, pair<T1, T2>& v) {
  return i >> v.first >> v.second;
}

constexpr ll INF = 0x3f3f3f3f3f3f3f3f;
constexpr ld PI = 3.141592653589793238462643383279;
ll get_digit(ll x) {
  return to_string(x).size();
}

ll gcd(ll x, ll y) {
  return y ? gcd(y, x % y) : x;
}

ll lcm(ll a, ll b) {
  return a / gcd(a, b) * b;
}

template <class T>
void chmax(T& a, const T& b) {
  if (a < b) a = b;
}

template <class T>
void chmin(T& a, const T& b) {
  if (b < a) a = b;
}

struct Vec2 {
  ld x, y;

  void add(Vec2 v) {
    x += v.x;
    y += v.y;
  }

  void rorate(ld rad) {
    ld ox = x;
    ld oy = y;
    x = ox * cos(rad) - oy * sin(rad);
    y = ox * sin(rad) + oy * cos(rad);
  }

  ld dot(Vec2 v) {
    return x * v.x + y * v.y;
  }

  ld norm() {
    return sqrtl(x * x + y * y);
  }
};

signed main() {
  init();
  ll N;
  cin >> N;
  vll A(N), B(N), C(N), D(N);
  rep(i, N) cin >> A[i] >> B[i];
  rep(i, N) cin >> C[i] >> D[i];

  ld ju_a = (ld)SUM(A) / (ld)N;
  ld ju_b = (ld)SUM(B) / (ld)N;
  ld ju_c = (ld)SUM(C) / (ld)N;
  ld ju_d = (ld)SUM(D) / (ld)N;

  // debug(ju_a);
  // debug(ju_b);
  // debug(ju_c);
  // debug(ju_d);
  vector<Vec2> X, Y;
  rep(i, N) {
    Vec2 a = {(ld)A[i] - ju_a, (ld)B[i] - ju_b};
    Vec2 b = {(ld)C[i] - ju_c, (ld)D[i] - ju_d};
    X.pb(a);
    Y.pb(b);
  }

  rep(i, N) {
    rep(j, N) {
      ld tanX = atan2l(X[i].y, X[i].x);
      ld tanY = atan2l(Y[j].y, Y[j].x);
      bool ok = true;

      mll done;
      rep(k, N) {
        Vec2 t1 = X[k];
        t1.rorate(-tanX);
        bool o = false;
        rep(p, N) {
          if (done[p] == 1) continue;
          Vec2 t2 = Y[p];
          t2.rorate(-tanY);
          if (abs(t1.x - t2.x) < 0.000001 and abs(t1.y - t2.y) < 0.000001) {
            o = true;
            done[p] = 1;
            break;
          }
        }
        if (!o) {
          ok = false;
          break;
        }
      }

      if (ok) {
        Yes;
        return 0;
      }

      // debug(X[i].x);
      // debug(X[i].y);
      // debug(Y[i].x);
      // debug(Y[i].y);

      // debug(tanX);
      // debug(tanY);
    }
  }
  No;

  return 0;
}