#include <bits/stdc++.h>
using namespace std;
int main() {
  long long N, W;
  pair<long long, long long> pos, arr[100005];
  int i, j;
  cin >> N >> W;
  cin >> pos.first >> pos.second;
  for (i = 0; i < N; i++) {
    cin >> arr[i].first >> arr[i].second;
  }
  i = 0;
  W %= 2LL * N;
  while (i < W) {
    pos.first = 2LL * arr[i % N].first - pos.first;
    pos.second = 2LL * arr[i % N].second - pos.second;
    i++;
  }
  cout << pos.first << " " << pos.second << endl;
  return 0;
}
