#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  long long int j;
  cin >> n >> j;
  vector<int> vx(n), vy(n);
  int x, y;
  cin >> x >> y;
  for (int i = 0; i < n; ++i) cin >> vx[i] >> vy[i];
  int k = int(j % (2 * n));
  for (int i = 0; i < k; ++i) {
    int t = i % n;
    x = 2 * vx[t] - x;
    y = 2 * vy[t] - y;
  }
  cout << x << " " << y;
  return 0;
}
