#include <bits/stdc++.h>
using namespace std;
struct TPoint {
  int X, Y;
};
int N;
long long Ask;
TPoint A[100005], M[100005 * 2];
int main() {
  scanf("%d%I64d", &N, &Ask);
  scanf("%d%d", &M[0].X, &M[0].Y);
  for (int i = 0; i < N; ++i) scanf("%d%d", &A[i].X, &A[i].Y);
  Ask %= (N + N);
  for (int i = 1; i <= Ask; ++i) {
    M[i].X = A[(i - 1) % N].X * 2 - M[i - 1].X;
    M[i].Y = A[(i - 1) % N].Y * 2 - M[i - 1].Y;
  }
  printf("%d %d\n", M[Ask].X, M[Ask].Y);
  return 0;
}
