#include <bits/stdc++.h>
using namespace std;
int ara[2][100005], n;
long long j;
int func(bool f, int x) {
  vector<int> vec;
  long long cycle = 2 * n;
  for (int i = 0; i < 2 * n; i++) {
    int ind = i % n;
    int v = ara[f][ind];
    int nv = v + (v - x);
    vec.push_back(nv), x = nv;
  }
  if (j <= vec.size()) return vec[j - 1];
  long long rem = j - 1;
  rem %= cycle;
  return vec[rem];
}
int main() {
  int x, y;
  scanf("%d %lld", &n, &j);
  scanf("%d %d", &x, &y);
  for (int i = 0; i < n; i++) scanf("%d %d", &ara[0][i], &ara[1][i]);
  printf("%d %d\n", func(0, x), func(1, y));
  return 0;
}
