#include <bits/stdc++.h>
using namespace std;
int x[1000000], y[1000000];
int X, Y;
int main() {
  int n;
  long long ind;
  cin >> n >> ind;
  cin >> X >> Y;
  for (int i = 0; i < n; ++i) cin >> x[i] >> y[i];
  ind %= (2 * n);
  if (ind == 0) {
    cout << X << " " << Y << endl;
    return 0;
  }
  for (int i = 0; i < ind; ++i) {
    int j = i;
    if (j >= n) j -= n;
    X = 2 * x[j] - X;
    Y = 2 * y[j] - Y;
  }
  cout << X << " " << Y << endl;
  return 0;
}
