#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:102400000,102400000")
template <class T>
inline void gmax(T &a, T b) {
  if (b > a) a = b;
}
template <class T>
inline void gmin(T &a, T b) {
  if (b < a) a = b;
}
using namespace std;
const int N = 1e5 + 10, M = 2e6 + 10, Z = 1e9 + 7, maxint = 2147483647,
          ms1 = 16843009, ms31 = 522133279, ms63 = 1061109567,
          ms127 = 2139062143;
const double PI = acos(-1.0), eps = 1e-8;
void fre() {
  freopen("/Users/luras/Desktop/in.txt", "r", stdin);
  freopen("/Users/luras/Desktop/out.txt", "w", stdout);
}
const int INF = 1e9;
int casenum, casei;
long long n, m;
long long ax[N], ay[N], x0, Y0;
long long sumx, sumy;
int main() {
  while (~scanf("%lld%lld", &n, &m)) {
    scanf("%lld%lld", &x0, &Y0);
    for (int i = 0; i < n; i++) {
      scanf("%lld%lld", &ax[i], &ay[i]);
    }
    m = m % (2 * n);
    sumx = 0;
    sumy = 0;
    for (int i = m - 1; i >= 0; i--) {
      if ((m - i) & 1) {
        sumx += ax[i % n] * 2;
        sumy += ay[i % n] * 2;
      } else {
        sumx -= ax[i % n] * 2;
        sumy -= ay[i % n] * 2;
      }
    }
    if (m & 1) {
      sumx -= x0;
      sumy -= Y0;
    } else {
      sumx += x0;
      sumy += Y0;
    }
    printf("%lld %lld\n", sumx, sumy);
  }
  return 0;
}
