#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  long long j;
  cin >> n >> j;
  int mx, my;
  cin >> mx >> my;
  vector<pair<int, int> > pts;
  for (int i = 0; i < n; i++) {
    int a, b;
    cin >> a >> b;
    pts.push_back(make_pair(a, b));
  }
  j = j % (2 * n);
  long long cx = mx, cy = my;
  for (int i = 0; i < j; i++) {
    int x = pts[i % n].first;
    int y = pts[i % n].second;
    cx = 2L * x - cx;
    cy = 2L * y - cy;
  }
  cout << cx << " " << cy << endl;
  return 0;
}
