#include <bits/stdc++.h>
using namespace std;
complex<long long> p[223456], p0;
complex<long long> go(complex<long long> s, long long K) {
  for (int i = 0; i < (K); i++) {
    complex<long long> diff = p[i] - s;
    s += diff + diff;
  }
  return s;
}
int main() {
  long long N, M, x, y;
  cin >> N >> M >> x >> y;
  p0 = complex<long long>(x, y);
  for (int i = 0; i < (N); i++) {
    cin >> x >> y;
    p[i] = p[N + i] = complex<long long>(x, y);
  }
  complex<long long> res = go(p0, M % (2 * N));
  cout << res.real() << ' ' << res.imag() << endl;
  return 0;
}
