#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int n;
  long long int j;
  long long int M0x;
  long long int M0y;
  long long int Mjx;
  long long int Mjy;
  int Ax[100000];
  int Ay[100000];
  cin >> n;
  cin >> j;
  cin >> M0x >> M0y;
  Mjx = M0x;
  Mjy = M0y;
  for (int i = 0; i < n; i++) cin >> Ax[i] >> Ay[i];
  j = j % (2 * n);
  for (int i = 0; i < j; i++) {
    Mjx = 2 * Ax[i % n] - Mjx;
    Mjy = 2 * Ay[i % n] - Mjy;
  }
  cout << Mjx << " " << Mjy;
  return 0;
}
