#include <bits/stdc++.h>
using namespace std;
vector<long long> vMul(const vector<vector<long long> >& A,
                       const vector<long long>& B) {
  const int n = A.size();
  vector<long long> C(n);
  for (int i = 0; i < n; ++i)
    for (int j = 0; j < n; ++j) C[i] += A[i][j] * B[j];
  return C;
}
vector<vector<long long> > mMul(const vector<vector<long long> >& A,
                                const vector<vector<long long> >& B) {
  const int n = A.size();
  vector<vector<long long> > C(n, vector<long long>(n));
  for (int i = 0; i < n; ++i)
    for (int j = 0; j < n; ++j) {
      long long Cij = 0;
      for (int k = 0; k < n; ++k) Cij += A[i][k] * B[k][j];
      C[i][j] = Cij;
    }
  return C;
}
vector<vector<long long> > mPow(vector<vector<long long> > M, long long t) {
  vector<vector<long long> > R;
  for (; t; t >>= 1, M = mMul(M, M))
    if (t & 1) R = (R.empty() ? M : mMul(R, M));
  return R;
}
int main() {
  int n;
  long long j;
  while (cin >> n >> j) {
    vector<long long> M(3, 1);
    cin >> M[0] >> M[1];
    vector<vector<vector<long long> > > A;
    for (int i = 0; i < n; ++i) {
      int x, y;
      cin >> x >> y;
      vector<vector<long long> > m1(3, vector<long long>(3));
      m1[0][0] = m1[1][1] = m1[2][2] = 1;
      m1[0][2] = -x;
      m1[1][2] = -y;
      vector<vector<long long> > m2(3, vector<long long>(3));
      m2[0][0] = m2[1][1] = -1;
      m2[2][2] = 1;
      vector<vector<long long> > m3(3, vector<long long>(3));
      m3[0][0] = m3[1][1] = m3[2][2] = 1;
      m3[0][2] = +x;
      m3[1][2] = +y;
      A.push_back(mMul(m3, mMul(m2, m1)));
    }
    for (int i = 1; i < n; ++i) A[i] = mMul(A[i], A[i - 1]);
    if (j / n) M = vMul(mPow(A[n - 1], j / n), M);
    if (j % n > 0) M = vMul(A[(j - 1) % n], M);
    cout << M[0] << " " << M[1] << endl;
  }
}
