#include <bits/stdc++.h>
using namespace std;
const long long N = 1e5 + 100;
struct point {
  long long x, y;
  point(){};
  point(long long a, long long b) : x(a), y(b){};
} rem[N];
point solve(point a, point b) {
  long long fri = abs(a.x - b.x);
  long long sec = abs(a.y - b.y);
  return point((a.x > b.x) ? b.x - fri : b.x + fri,
               (a.y > b.y) ? b.y - sec : b.y + sec);
}
signed main() {
  long long n, m;
  cin >> n >> m;
  ;
  long long x, y;
  cin >> x >> y;
  point ans = point(x, y);
  for (long long i = 0; i < n; i++) {
    cin >> x >> y;
    rem[i] = point(x, y);
  }
  long long cnt = 0;
  m = m % (2 * n);
  while (m--) {
    ans = solve(ans, rem[cnt]);
    cnt = (cnt + 1) % n;
  }
  cout << ans.x << " " << ans.y << endl;
}
