#include <bits/stdc++.h>
using namespace std;
void run() {
  long long n, idx;
  cin >> n >> idx;
  long long mx, my;
  vector<long long> xx(n), yy(n);
  cin >> mx >> my;
  for (int i = 0; i < (n); ++i) cin >> xx[i] >> yy[i];
  idx %= (n << 1);
  for (int i = 0; i < (idx); ++i) {
    int ii = (i % n);
    mx = (xx[ii] << 1) - mx;
    my = (yy[ii] << 1) - my;
  }
  cout << mx << " " << my << endl;
}
int main() {
  run();
  return 0;
}
