#include <bits/stdc++.h>

using namespace std;
typedef double db;
struct P{
    db x, y;
    P(){}
    P(db x, db y) : x(x) , y(y) {}
    db dot(P a){ return a.x*x + a.y*y; }
    P operator - (P a){ return P(x-a.x, y-a.y); }
    P operator + (P a){ return P(x+a.x, y+a.y); }
    P operator * (db a){ return P(x*a, y*a); }
    db len(){ return sqrt(x*x+y*y); }
};
typedef P V;
struct L{ P p, q; };

P projection(P a, L l){ //求得点a在l上的投影点坐标
    P tl = l.q - l.p;  //表示l的两个点形成的线段
    db ll = tl.len();  //线段长度
    db k = (a-l.p).dot(tl)/ll/ll;  //投影长度与线段长度的比值
    return P( l.p.x + k*tl.x, l.p.y + k*tl.y ); //最终结果
}

P reflection(P a, L l){ //点a关于点l的对称点
    P tmp = projection(a, l);
    return a+(tmp-a)*2;
}

int main(){
    //freopen("owo.in","r",stdin);
    int n;
    L l;
    scanf("%lf%lf%lf%lf",&l.p.x, &l.p.y, &l.q.x, &l.q.y);
    cin >> n;
    P a;
    while(n--){
        scanf("%lf%lf", &a.x, &a.y);
        P ta = reflection(a, l);
        printf("%.9lf %.9lf\n", ta.x, ta.y);
    }
    return 0;
}

### Prompt

Construct a Cpp code solution to the problem outlined:

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 <bits/stdc++.h>

using namespace std;
typedef double db;
struct P{
    db x, y;
    P(){}
    P(db x, db y) : x(x) , y(y) {}
    db dot(P a){ return a.x*x + a.y*y; }
    P operator - (P a){ return P(x-a.x, y-a.y); }
    P operator + (P a){ return P(x+a.x, y+a.y); }
    P operator * (db a){ return P(x*a, y*a); }
    db len(){ return sqrt(x*x+y*y); }
};
typedef P V;
struct L{ P p, q; };

P projection(P a, L l){ //求得点a在l上的投影点坐标
    P tl = l.q - l.p;  //表示l的两个点形成的线段
    db ll = tl.len();  //线段长度
    db k = (a-l.p).dot(tl)/ll/ll;  //投影长度与线段长度的比值
    return P( l.p.x + k*tl.x, l.p.y + k*tl.y ); //最终结果
}

P reflection(P a, L l){ //点a关于点l的对称点
    P tmp = projection(a, l);
    return a+(tmp-a)*2;
}

int main(){
    //freopen("owo.in","r",stdin);
    int n;
    L l;
    scanf("%lf%lf%lf%lf",&l.p.x, &l.p.y, &l.q.x, &l.q.y);
    cin >> n;
    P a;
    while(n--){
        scanf("%lf%lf", &a.x, &a.y);
        P ta = reflection(a, l);
        printf("%.9lf %.9lf\n", ta.x, ta.y);
    }
    return 0;
}

```