#include <bits/stdc++.h>
using namespace std;
pair<long long, long long> T[100100];
int main() {
  long long n, j;
  cin >> n >> j;
  long long xm, ym;
  cin >> xm >> ym;
  for (int i = 0; i < n; i++) cin >> T[i].first >> T[i].second;
  for (int i = 0; i < j % (2 * n); i++) {
    xm = 2 * T[i % n].first - xm;
    ym = 2 * T[i % n].second - ym;
  }
  cout << xm << " " << ym << endl;
  return 0;
}
