#include <bits/stdc++.h>
using namespace std;
template <class Ta, class Tb>
inline void checkmin(Ta &a, Tb b) {
  if (b < a) a = b;
}
template <class T>
inline void checkmax(T &a, T b) {
  if (b > a) a = b;
}
template <class T>
inline int countbit(T n) {
  return (n == 0) ? 0 : (1 + countbit(n & (n - 1)));
}
template <class T>
inline T sqr(T x) {
  return x * x;
}
template <class T>
inline T lowbit(T n) {
  return n & (-n);
}
template <class T>
inline T gcd(T a, T b) {
  if (a < 0) return gcd(-a, b);
  if (b < 0) return gcd(a, -b);
  return (b == 0) ? a : gcd(b, a % b);
}
template <class T>
inline T lcm(T a, T b) {
  if (a < 0) return lcm(-a, b);
  if (b < 0) return lcm(a, -b);
  return a * (b / gcd(a, b));
}
template <class T>
inline T euclide(T a, T b, T &x, T &y) {
  if (a < 0) {
    T d = euclide(-a, b, x, y);
    x = -x;
    return d;
  }
  if (b < 0) {
    T d = euclide(a, -b, x, y);
    y = -y;
    return d;
  }
  if (b == 0) {
    x = 1;
    y = 0;
    return a;
  } else {
    T d = euclide(b, a % b, x, y);
    T t = x;
    x = y;
    y = t - (a / b) * y;
    return d;
  }
}
const double pi = acos(-1.0);
const double ei = 2.718281828459;
const double eps = (1e-10);
const int Dx[8] = {-1, 0, 1, 0, -1, 1, 1, -1};
const int Dy[8] = {0, 1, 0, -1, 1, 1, -1, -1};
const double inf = 1000000000;
const int mod = 123657;
const int MAXN = 150010;
const int MAXM = 50010;
long long X0, Y0;
long long X[MAXN], Y[MAXN];
int main() {
  long long n, M;
  cin >> n >> M;
  cin >> X0 >> Y0;
  for (int i = 0; i < n; i++) cin >> X[i] >> Y[i];
  if (M <= n) {
    for (int i = 0; i < M; i++) {
      X0 = 2 * X[i] - X0;
      Y0 = 2 * Y[i] - Y0;
    }
    cout << X0 << " " << Y0 << endl;
  } else {
    long long X1 = 0, Y1 = 0;
    for (int i = 0; i < n; i++) {
      X1 = 2 * X[i] - X1;
      Y1 = 2 * Y[i] - Y1;
    }
    long long d = M / n;
    if (n & 1) {
      if (d & 1) {
        X1 = X1 - X0;
        Y1 = Y1 - Y0;
      } else {
        X1 = X0;
        Y1 = Y0;
      }
    } else {
      X1 = d * X1 + X0;
      Y1 = d * Y1 + Y0;
    }
    M %= n;
    for (int i = 0; i < M; i++) {
      X1 = 2 * X[i] - X1;
      Y1 = 2 * Y[i] - Y1;
    }
    cout << X1 << " " << Y1 << endl;
  }
  return 0;
}

### Prompt

Please create a solution in cpp to the following problem:

You are given the following points with integer coordinates on the plane: M0, A0, A1, ..., An - 1, where n is odd number. Now we define the following infinite sequence of points Mi: Mi is symmetric to Mi - 1 according <image> (for every natural number i). Here point B is symmetric to A according M, if M is the center of the line segment AB. Given index j find the point Mj.

Input

On the first line you will be given an integer n (1 ≤ n ≤ 105), which will be odd, and j (1 ≤ j ≤ 1018), where j is the index of the desired point. The next line contains two space separated integers, the coordinates of M0. After that n lines follow, where the i-th line contain the space separated integer coordinates of the point Ai - 1. The absolute values of all input coordinates will not be greater then 1000.

Output

On a single line output the coordinates of Mj, space separated.

Examples

Input

3 4
0 0
1 1
2 3
-5 3


Output

14 0


Input

3 1
5 5
1000 1000
-1000 1000
3 100


Output

1995 1995

### Response

```cpp
#include <bits/stdc++.h>
using namespace std;
template <class Ta, class Tb>
inline void checkmin(Ta &a, Tb b) {
  if (b < a) a = b;
}
template <class T>
inline void checkmax(T &a, T b) {
  if (b > a) a = b;
}
template <class T>
inline int countbit(T n) {
  return (n == 0) ? 0 : (1 + countbit(n & (n - 1)));
}
template <class T>
inline T sqr(T x) {
  return x * x;
}
template <class T>
inline T lowbit(T n) {
  return n & (-n);
}
template <class T>
inline T gcd(T a, T b) {
  if (a < 0) return gcd(-a, b);
  if (b < 0) return gcd(a, -b);
  return (b == 0) ? a : gcd(b, a % b);
}
template <class T>
inline T lcm(T a, T b) {
  if (a < 0) return lcm(-a, b);
  if (b < 0) return lcm(a, -b);
  return a * (b / gcd(a, b));
}
template <class T>
inline T euclide(T a, T b, T &x, T &y) {
  if (a < 0) {
    T d = euclide(-a, b, x, y);
    x = -x;
    return d;
  }
  if (b < 0) {
    T d = euclide(a, -b, x, y);
    y = -y;
    return d;
  }
  if (b == 0) {
    x = 1;
    y = 0;
    return a;
  } else {
    T d = euclide(b, a % b, x, y);
    T t = x;
    x = y;
    y = t - (a / b) * y;
    return d;
  }
}
const double pi = acos(-1.0);
const double ei = 2.718281828459;
const double eps = (1e-10);
const int Dx[8] = {-1, 0, 1, 0, -1, 1, 1, -1};
const int Dy[8] = {0, 1, 0, -1, 1, 1, -1, -1};
const double inf = 1000000000;
const int mod = 123657;
const int MAXN = 150010;
const int MAXM = 50010;
long long X0, Y0;
long long X[MAXN], Y[MAXN];
int main() {
  long long n, M;
  cin >> n >> M;
  cin >> X0 >> Y0;
  for (int i = 0; i < n; i++) cin >> X[i] >> Y[i];
  if (M <= n) {
    for (int i = 0; i < M; i++) {
      X0 = 2 * X[i] - X0;
      Y0 = 2 * Y[i] - Y0;
    }
    cout << X0 << " " << Y0 << endl;
  } else {
    long long X1 = 0, Y1 = 0;
    for (int i = 0; i < n; i++) {
      X1 = 2 * X[i] - X1;
      Y1 = 2 * Y[i] - Y1;
    }
    long long d = M / n;
    if (n & 1) {
      if (d & 1) {
        X1 = X1 - X0;
        Y1 = Y1 - Y0;
      } else {
        X1 = X0;
        Y1 = Y0;
      }
    } else {
      X1 = d * X1 + X0;
      Y1 = d * Y1 + Y0;
    }
    M %= n;
    for (int i = 0; i < M; i++) {
      X1 = 2 * X[i] - X1;
      Y1 = 2 * Y[i] - Y1;
    }
    cout << X1 << " " << Y1 << endl;
  }
  return 0;
}

```