#include <bits/stdc++.h>
int pocX, pocY;
int tackeX[100005];
int tackeY[100005];
long long rind;
int n;
int main() {
  scanf("%d %I64d", &n, &rind);
  scanf("%d %d", &pocX, &pocY);
  for (int i = 0; i < n; i++) scanf("%d %d", tackeX + i, tackeY + i);
  int sX, sY;
  sX = pocX;
  sY = pocY;
  for (int i = 0; i < n; i++) {
    sX = sX + 2 * (tackeX[i] - sX);
    sY = sY + 2 * (tackeY[i] - sY);
  }
  if (rind / n % 2 == 1) {
    pocX = sX;
    pocY = sY;
  }
  sX = pocX;
  sY = pocY;
  rind %= n;
  int kol = rind;
  for (int i = 0; i < kol; i++) {
    sX = sX + 2 * (tackeX[i] - sX);
    sY = sY + 2 * (tackeY[i] - sY);
  }
  printf("%d %d\n", sX, sY);
  return 0;
}
