#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100000 + 10;
int n;
long long k;
int a[MAXN][2];
int x, y;
int main() {
  cin >> n >> k;
  cin >> x >> y;
  for (int i = 0; i < n; i++) cin >> a[i][0] >> a[i][1];
  k = k % (2 * n);
  for (int i = 0; i < k; i++) {
    x = 2 * a[i % n][0] - x;
    y = 2 * a[i % n][1] - y;
  }
  cout << x << " " << y << endl;
}
