#include <bits/stdc++.h>
using namespace std;
long long xo, yo;
long long x[300000], y[300000];
int n;
long long j;
int main() {
  cin >> n >> j;
  cin >> xo >> yo;
  for (int i = 0; i < n; i++) cin >> x[i] >> y[i];
  for (int i = 0; i < n; i++) x[i + n] = x[i], y[i + n] = y[i];
  n *= 2;
  long long xf = xo, yf = yo;
  long long falta = j % n;
  for (int i = 0; i < falta; i++) {
    xf = 2 * x[i] - xf;
    yf = 2 * y[i] - yf;
  }
  cout << xf << " " << yf << endl;
}
