#include <bits/stdc++.h>
using namespace std;
long long read() {
  long long res = 0, flag = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') flag = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    res = (res << 3) + (res << 1) + (ch ^ 48);
    ch = getchar();
  }
  return res * flag;
}
const long long maxn = 2e5 + 5;
const long long mod = 1e9 + 7;
const double pi = acos(-1);
const double eps = 1e-8;
long long n, m, k;
pair<long long, long long> st, cur, a[maxn];
set<pair<long long, long long>> s;
signed main() {
  n = read(), m = read();
  m %= 2 * n;
  scanf("%lld%lld", &st.first, &st.second);
  for (long long i = 0; i < n; i++)
    scanf("%lld%lld", &a[i].first, &a[i].second);
  s.insert(st);
  for (long long i = 1; i <= m; i++) {
    pair<long long, long long> tmp;
    tmp.first = 2 * a[k].first - st.first;
    tmp.second = 2 * a[k].second - st.second;
    st = tmp;
    k = (k + 1) % n;
  }
  cout << st.first << " " << st.second << endl;
  return 0;
}
