#include <iostream>
#include <algorithm>
#include <vector>
#include <queue>
#include <map>
#include <cmath>
#include <iomanip>
#include <complex>
using namespace std;
#define REP(i,n) for (int i=0;i<(n);++i)
#define rep(i,a,b) for(int i=a;i<(b);++i)
template<class T> inline bool chmin(T &a, T b){ if(a > b) { a = b; return true;} return false;}
template<class T> inline bool chmax(T &a, T b){ if(a < b) { a = b; return true;} return false;}
using ll = long long;
constexpr long long INF = 1LL << 62;
constexpr int MOD = 1e9 + 7;

using Point = complex<double>;
struct Line {
    Point s, t;
    Line(Point s, Point t) : s(s), t(t){}
};
double dot(Point p, Point q) { return (conj(p) * q).real(); }
double cross(Point p, Point q) { return (conj(p) * q).imag(); }
Point project(Line l, Point p) { // project p onto line (s,t)
    return l.s + (l.t - l.s) * dot(p - l.s, l.t - l.s) / norm(l.t - l.s);
}
Point reflect(Line l, Point p) {
    return l.s + conj((p - l.s) / (l.t - l.s)) * (l.t - l.s);
}

int main() {
    cin.tie(0); ios_base::sync_with_stdio(false);
    double a,b,c,d;
    cin >> a >> b >> c >> d;
    Point p1(a, b), p2(c, d);
    Line l(p1, p2);
    cout << fixed << setprecision(10);

    int q;
    cin >> q;
    for(int i=0; i < q; ++i) {
        double x,y;
        cin >> x >> y;
        Point ret = reflect(l, Point(x, y));
        cout << ret.real() << " " << ret.imag() << '\n';
    }
    return 0;
}

### Prompt

In Cpp, your task is to solve the following problem:

For given three points p1, p2, p, find the reflection point x of p onto p1p2.

<image>

Constraints

* 1 ≤ q ≤ 1000
* -10000 ≤ xi, yi ≤ 10000
* p1 and p2 are not identical.

Input


xp1 yp1 xp2 yp2
q
xp0 yp0
xp1 yp1
...
xpq−1 ypq−1


In the first line, integer coordinates of p1 and p2 are given. Then, q queries are given for integer coordinates of p.

Output

For each query, print the coordinate of the reflection point x. The output values should be in a decimal fraction with an error less than 0.00000001.

Examples

Input

0 0 2 0
3
-1 1
0 1
1 1


Output

-1.0000000000 -1.0000000000
0.0000000000 -1.0000000000
1.0000000000 -1.0000000000


Input

0 0 3 4
3
2 5
1 4
0 3


Output

4.2400000000 3.3200000000
3.5600000000 2.0800000000
2.8800000000 0.8400000000

### Response

```cpp
#include <iostream>
#include <algorithm>
#include <vector>
#include <queue>
#include <map>
#include <cmath>
#include <iomanip>
#include <complex>
using namespace std;
#define REP(i,n) for (int i=0;i<(n);++i)
#define rep(i,a,b) for(int i=a;i<(b);++i)
template<class T> inline bool chmin(T &a, T b){ if(a > b) { a = b; return true;} return false;}
template<class T> inline bool chmax(T &a, T b){ if(a < b) { a = b; return true;} return false;}
using ll = long long;
constexpr long long INF = 1LL << 62;
constexpr int MOD = 1e9 + 7;

using Point = complex<double>;
struct Line {
    Point s, t;
    Line(Point s, Point t) : s(s), t(t){}
};
double dot(Point p, Point q) { return (conj(p) * q).real(); }
double cross(Point p, Point q) { return (conj(p) * q).imag(); }
Point project(Line l, Point p) { // project p onto line (s,t)
    return l.s + (l.t - l.s) * dot(p - l.s, l.t - l.s) / norm(l.t - l.s);
}
Point reflect(Line l, Point p) {
    return l.s + conj((p - l.s) / (l.t - l.s)) * (l.t - l.s);
}

int main() {
    cin.tie(0); ios_base::sync_with_stdio(false);
    double a,b,c,d;
    cin >> a >> b >> c >> d;
    Point p1(a, b), p2(c, d);
    Line l(p1, p2);
    cout << fixed << setprecision(10);

    int q;
    cin >> q;
    for(int i=0; i < q; ++i) {
        double x,y;
        cin >> x >> y;
        Point ret = reflect(l, Point(x, y));
        cout << ret.real() << " " << ret.imag() << '\n';
    }
    return 0;
}

```