#include <bits/stdc++.h>
using namespace std;
struct point {
  long long x, y;
};
point sym(point a, point center) {
  point ans;
  ans.x = 2 * center.x - a.x;
  ans.y = 2 * center.y - a.y;
  return ans;
}
int main() {
  point m;
  int n;
  long long j;
  scanf("%d%I64d", &n, &j);
  scanf("%I64d%I64d", &m.x, &m.y);
  point term[100005];
  for (int i = 0; i < n; i++) {
    scanf("%I64d%I64d", &term[i].x, &term[i].y);
  }
  for (int i = 0; i < j % (2 * n); i++) {
    m = sym(m, term[i % n]);
  }
  printf("%I64d %I64d\n", m.x, m.y);
  return 0;
}
