#include <cmath>
#include <complex>
#include <algorithm>
using namespace std;

#define PCR Point const &

typedef long double Real;
typedef complex<Real> Point;
struct Segment {
    Point p[2];
    Segment (PCR a = Point(), PCR b = Point()){
        p[0] = a, p[1] = b;
    }
    Point & operator [] (int k) { return p[k]; }
    Point const & operator [] (int k) const { return p[k]; }
};
typedef vector<Point> Polygon;
struct Circle { Real radius; Point center; };

#define X real()
#define Y imag()

Real dot(PCR a, PCR b){
    return a.X*b.X + a.Y*b.Y;
}
Real cross(PCR a, PCR b){
    return a.X*b.Y - a.Y*b.X;
}

Point pSP(Segment const & s, PCR p){
    Point base = s[1] - s[0];
    Real r = dot(p - s[0], base) / norm(base);
    return s[0] + base * r;
}

Point rSP(Segment const & s, PCR p){
    Point v = pSP(s,p) - p;
    return p + v * Real(2);
}

#include <iostream>
#include <cstdio>

int main(){
    Segment s;
    Real x,y;
    cin >> x >> y;
    s[0] = Point(x,y);
    cin >> x >> y;
    s[1] = Point(x,y);
    int q;
    cin >> q;
    for(int i=0;i<q;i++){
        cin >> x >> y;
        Point p = rSP(s, Point(x,y));
        printf("%.10Lf %.10Lf\n", p.X, p.Y);
    }
}
### Prompt

Generate a cpp solution to 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 <cmath>
#include <complex>
#include <algorithm>
using namespace std;

#define PCR Point const &

typedef long double Real;
typedef complex<Real> Point;
struct Segment {
    Point p[2];
    Segment (PCR a = Point(), PCR b = Point()){
        p[0] = a, p[1] = b;
    }
    Point & operator [] (int k) { return p[k]; }
    Point const & operator [] (int k) const { return p[k]; }
};
typedef vector<Point> Polygon;
struct Circle { Real radius; Point center; };

#define X real()
#define Y imag()

Real dot(PCR a, PCR b){
    return a.X*b.X + a.Y*b.Y;
}
Real cross(PCR a, PCR b){
    return a.X*b.Y - a.Y*b.X;
}

Point pSP(Segment const & s, PCR p){
    Point base = s[1] - s[0];
    Real r = dot(p - s[0], base) / norm(base);
    return s[0] + base * r;
}

Point rSP(Segment const & s, PCR p){
    Point v = pSP(s,p) - p;
    return p + v * Real(2);
}

#include <iostream>
#include <cstdio>

int main(){
    Segment s;
    Real x,y;
    cin >> x >> y;
    s[0] = Point(x,y);
    cin >> x >> y;
    s[1] = Point(x,y);
    int q;
    cin >> q;
    for(int i=0;i<q;i++){
        cin >> x >> y;
        Point p = rSP(s, Point(x,y));
        printf("%.10Lf %.10Lf\n", p.X, p.Y);
    }
}
```