#include <bits/stdc++.h>
int main(void) {
  long long x0;
  long long y0;
  unsigned n_points;
  long long unsigned index;
  std::vector<long long> Ax;
  std::vector<long long> Ay;
  scanf(
      "%u"
      "%I64u",
      &n_points, &index);
  index %= n_points << 1;
  Ax.resize(n_points);
  Ay.resize(n_points);
  scanf(
      "%I64d"
      "%I64d",
      &x0, &y0);
  for (unsigned i = 0; i < n_points; ++i) {
    scanf(
        "%I64d"
        "%I64d",
        &Ax[i], &Ay[i]);
  }
  for (unsigned t = 0; t < index; ++t) {
    x0 = (Ax[t % n_points] << 1) - x0;
    y0 = (Ay[t % n_points] << 1) - y0;
  }
  printf(
      "%I64d"
      " "
      "%I64d"
      "\n",
      x0, y0);
  return 0;
}
