#include <bits/stdc++.h>
using namespace std;
int A[100010][2], M0[2];
int main() {
  int n;
  long long j;
  cin >> n >> j >> M0[0] >> M0[1];
  for (int i = 0; i < n; i++) cin >> A[i][0] >> A[i][1];
  j = j % (2 * n);
  for (int i = 1; i <= j; i++) {
    M0[0] = 2 * A[(i - 1) % n][0] - M0[0];
    M0[1] = 2 * A[(i - 1) % n][1] - M0[1];
  }
  cout << M0[0] << " " << M0[1] << endl;
  return 0;
}
