#include <bits/stdc++.h>
using namespace std;
long long n, k, x, y, a[100005], b[100005];
signed main() {
  ios_base::sync_with_stdio(0);
  cin >> n >> k;
  cin >> x >> y;
  for (long long i = 0; i < n; i++) {
    cin >> a[i] >> b[i];
  }
  k %= 2 * n;
  for (long long i = 1; i <= k; i++) {
    x = x - 2 * (x - a[(i - 1) % n]);
    y = y - 2 * (y - b[(i - 1) % n]);
  }
  cout << x << " " << y << '\n';
  return 0;
}
