#include <bits/stdc++.h>
using namespace std;
long long aX[100001];
long long aY[100001];
int main() {
  long long n, k;
  cin >> n >> k;
  long long x, y;
  cin >> x >> y;
  long long mod = n * 2;
  for (int i = 0; i < n; i++) cin >> aX[i] >> aY[i];
  k = k % mod;
  long long cx = 0, cy = 0;
  for (int i = 1; i <= k; i++) {
    cx = 2 * aX[(i - 1) % n] - cx;
    cy = 2 * aY[(i - 1) % n] - cy;
  }
  if (k % 2 == 1)
    cx -= x, cy -= y;
  else
    cx += x, cy += y;
  cout << cx << " " << cy << endl;
  return 0;
}
