#include <bits/stdc++.h>
using namespace std;
int n;
long long M00, M01, j;
int Xs[1000001], Ys[1000001];
int main() {
  cin >> n >> j;
  cin >> M00 >> M01;
  for (int i = 0; i < n; i++) {
    cin >> Xs[i] >> Ys[i];
  }
  j %= 2 * n;
  for (int i = 0; i < j; i++) {
    M00 = 2 * Xs[i % n] - M00;
    M01 = 2 * Ys[i % n] - M01;
  }
  cout << M00 << ' ' << M01 << endl;
  return 0;
}
