#include <bits/stdc++.h>
int solve(int st, int x[], int n, int step) {
  int i;
  for (i = 0; i < step; i++) st += 2 * (x[i % n] - st);
  return st;
}
int x[100001], y[100001];
int main() {
  int i, j, k, l, m, n;
  int sx, sy, ex, ey;
  long long step;
  scanf("%d%I64lld", &n, &step);
  scanf("%d%d", &sx, &sy);
  for (i = 0; i < n; i++) scanf("%d%d", x + i, y + i);
  ex = solve(sx, x, n, step % (2 * n));
  ey = solve(sy, y, n, step % (2 * n));
  printf("%d %d\n", ex, ey);
  return 0;
}
