#include <bits/stdc++.h>
#pragma GCC optimize(2)
using namespace std;
const int N = 5e5 + 1;
const int M = 0x3f3f3f3f;
const int inf = 0x7fffffff;
const long long mod = 1e9 + 7;
struct node {
  int x, y;
} mp[N];
int S(node a, node b, node c) {
  int k = (b.x - a.x) * (c.y - a.y) - (b.y - a.y) * (c.x - a.x);
  if (k == 0) return 0;
  if (k < 0) return -1;
  if (k > 0) return 1;
}
bool F(node a, node b, node c, node p) {
  int ans = S(a, b, p);
  if (ans != S(b, c, p)) return false;
  if (ans != S(c, a, p)) return false;
  if (S(a, b, c) == 0) return false;
  return true;
}
inline long long F2(long long a, long long x) {
  if (a > x)
    a = x - abs(a - x);
  else
    a = x + abs(a - x);
  return a;
}
inline void Solve() {
  long long n, m, a, b;
  cin >> n >> m >> a >> b;
  for (long long i = 0; i < n; i++) cin >> mp[i].x >> mp[i].y;
  m = m % (2 * n);
  for (long long i = 0; i < m; i++) {
    a = F2(a, mp[i % n].x);
    b = F2(b, mp[i % n].y);
  }
  cout << a << " " << b << endl;
}
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  Solve();
  return 0;
}
