#include <bits/stdc++.h>
using namespace std;
pair<int, int> a[100001];
int main() {
  int n;
  long long k;
  cin >> n >> k;
  pair<int, int> m, save;
  cin >> m.first >> m.second;
  save = m;
  for (int i = 0; i < n; i++) {
    cin >> a[i].first >> a[i].second;
  }
  int sum1 = 0, sum2 = 0;
  int zarb = 1;
  k = k % (2 * n);
  for (int i = 0; i < k; i++) {
    m.first = 2 * (a[i % n].first - m.first) + m.first;
    m.second = 2 * (a[i % n].second - m.second) + m.second;
  }
  cout << m.first << " " << m.second << endl;
  return 0;
}
