#include <bits/stdc++.h>
using namespace std;
namespace LCY{
    #define double long double
    const double EPS=1e-10;
    inline int dcmp(double x){if(fabs(x)<EPS)return 0;return (x<0)?-1:1;}
    struct Point{double x,y;Point(double _x=0,double _y=0){x=_x;y=_y;}};
    struct Vector{double x,y;Vector(double _x=0,double _y=0){x=_x;y=_y;}};
     
    Vector operator - (Point a,Point b){return Vector(a.x-b.x,a.y-b.y);}
    Vector operator * (Vector a,double d){return Vector(a.x*d,a.y*d);}
    Point operator + (Point a,Vector b){return Point(a.x+b.x,a.y+b.y);}
     
    inline double dot(Vector a,Vector b){return a.x*b.x+a.y*b.y;}
    inline double cross(Vector a,Vector b){return a.x*b.y-a.y*b.x;}
    inline double norm(Vector a){return dot(a,a);}
     
    struct Line{
        Point p1,p2;
        Line(Point _p1=Point(0,0),Point _p2=Point(0,0)){p1=_p1;p2=_p2;}
    };
     
    Point project(Line l,Point p){
        Vector base=l.p2-l.p1;
        double r=dot(p-l.p1,base)/norm(base);
        return l.p1+base*r;
    }
    Point reflect(Line l,Point p){
        Point q=project(l,p);
        Vector v=p-q;v.x=-v.x;v.y=-v.y;
        return q+v;
    }
}
using namespace LCY;
int main(){
    Point p1,p2;cin>>p1.x>>p1.y>>p2.x>>p2.y;
    int n;cin>>n;while(n--){
        Point q;cin>>q.x>>q.y;Point res=reflect(Line(p1,p2),q);
        cout<<setiosflags(ios::fixed)<<setprecision(10)<<res.x<<" "<<res.y<<endl;
    }
    return 0;
}


### Prompt

Please formulate 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 <bits/stdc++.h>
using namespace std;
namespace LCY{
    #define double long double
    const double EPS=1e-10;
    inline int dcmp(double x){if(fabs(x)<EPS)return 0;return (x<0)?-1:1;}
    struct Point{double x,y;Point(double _x=0,double _y=0){x=_x;y=_y;}};
    struct Vector{double x,y;Vector(double _x=0,double _y=0){x=_x;y=_y;}};
     
    Vector operator - (Point a,Point b){return Vector(a.x-b.x,a.y-b.y);}
    Vector operator * (Vector a,double d){return Vector(a.x*d,a.y*d);}
    Point operator + (Point a,Vector b){return Point(a.x+b.x,a.y+b.y);}
     
    inline double dot(Vector a,Vector b){return a.x*b.x+a.y*b.y;}
    inline double cross(Vector a,Vector b){return a.x*b.y-a.y*b.x;}
    inline double norm(Vector a){return dot(a,a);}
     
    struct Line{
        Point p1,p2;
        Line(Point _p1=Point(0,0),Point _p2=Point(0,0)){p1=_p1;p2=_p2;}
    };
     
    Point project(Line l,Point p){
        Vector base=l.p2-l.p1;
        double r=dot(p-l.p1,base)/norm(base);
        return l.p1+base*r;
    }
    Point reflect(Line l,Point p){
        Point q=project(l,p);
        Vector v=p-q;v.x=-v.x;v.y=-v.y;
        return q+v;
    }
}
using namespace LCY;
int main(){
    Point p1,p2;cin>>p1.x>>p1.y>>p2.x>>p2.y;
    int n;cin>>n;while(n--){
        Point q;cin>>q.x>>q.y;Point res=reflect(Line(p1,p2),q);
        cout<<setiosflags(ios::fixed)<<setprecision(10)<<res.x<<" "<<res.y<<endl;
    }
    return 0;
}


```