#include <bits/stdc++.h>
using namespace std;
pair<long long, long long> a[200005];
signed main() {
  long long n, j;
  cin >> n >> j;
  j %= 2 * n;
  long long x0, y0;
  cin >> x0 >> y0;
  for (long long i = 0; i < n; i++) {
    cin >> a[i].first >> a[i].second;
  }
  for (long long i = 1; i <= j; i++) {
    x0 = 2 * a[(i - 1) % n].first - x0;
    y0 = 2 * a[(i - 1) % n].second - y0;
  }
  cout << x0 << ' ' << y0;
}
