#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 10;
int n;
long long j;
int sx, sy;
int x[N], y[N];
long long px[N], py[N];
pair<long long, long long> get(long long j) {
  long long c = (j - 1) / n;
  long long r = j - c * n;
  return make_pair(c, r);
}
int main() {
  scanf("%d%lld", &n, &j);
  scanf("%d%d", &sx, &sy);
  for (int i = 0; i < n; ++i) {
    scanf("%d%d", x + i, y + i);
  }
  for (int i = 0; i < n; ++i) {
    x[i + n] = x[i];
    y[i + n] = y[i];
  }
  n *= 2;
  px[0] = 0, py[0] = 0;
  for (int i = 0; i < n; ++i) {
    px[i + 1] = x[i] * 2 - px[i];
    py[i + 1] = y[i] * 2 - py[i];
  }
  pair<long long, long long> p = get(j);
  long long c = p.first, r = p.second;
  if (r & 1)
    printf("%lld %lld\n", c * px[n] + px[r] - sx, c * py[n] + py[r] - sy);
  else
    printf("%lld %lld\n", c * px[n] + px[r] + sx, c * py[n] + py[r] + sy);
  return 0;
}
