#include <bits/stdc++.h>
long long m, n, x[100010], y[100010], ax, ay, bx, by;
int main() {
  scanf("%lld %lld\n%lld %lld", &n, &m, &ax, &ay);
  for (long long i = 0; i < n; i++) scanf("%lld %lld", &x[i], &y[i]);
  m = m % (2 * n);
  for (long long i = 0; i < m; i++) {
    bx = x[i % n] * 2 - ax, by = y[i % n] * 2 - ay;
    ax = bx, ay = by;
  }
  printf("%lld %lld", ax, ay);
}
