#include <bits/stdc++.h>
using namespace std;
template <class T>
inline int size(const T& c) {
  return c.size();
}
const int maxn = 100000;
long long X[maxn], Y[maxn];
int main() {
  long long n, J;
  long long Mx, My;
  cin >> n >> J >> Mx >> My;
  for (int i = (0), _b = ((n)-1); i <= _b; i++) cin >> X[i] >> Y[i];
  for (int i = (0), _b = ((J % (2 * n)) - 1); i <= _b; i++) {
    Mx = 2 * X[i % n] - Mx;
    My = 2 * Y[i % n] - My;
  }
  cout << Mx << " " << My << endl;
}
