#include <bits/stdc++.h>
using namespace std;
int n;
long long j;
long long ix, iy;
int mx[100100], my[100100];
inline void reflect(int in, long long ax, long long ay, long long& bx,
                    long long& by) {
  bx = ax + ((mx[in] - ax) << 1);
  by = ay + ((my[in] - ay) << 1);
  return;
}
int main() {
  cin >> n >> j;
  int i, cnt = 0;
  long long a, b;
  memset((mx), (0), sizeof((mx)));
  memset((my), (0), sizeof((my)));
  j = j % ((long long)(2 * n));
  cin >> ix >> iy;
  for (i = 0; i < n; i++) {
    cin >> mx[i] >> my[i];
  }
  a = ix;
  b = iy;
  while (cnt < j) {
    for (i = 0; i < n && cnt < j; i++) {
      reflect(i, ix, iy, a, b);
      ix = a;
      iy = b;
      cnt++;
    }
  }
  cout << ix << " " << iy << "\n";
  return 0;
}
