#include <bits/stdc++.h>
using namespace std;

struct Point 
{
  double x, y;
  
  Point() {}
  
  Point(double x, double y) : x(x), y(y) {}
  
  void input() { scanf("%lf %lf", &x, &y); }
  void output() { printf("%.10f %.10f\n", x, y); }
  double abs() { return (sqrt(norm())); }
  double norm() { return (x * x + y * y); }
  
  Point operator + (Point d) { return (Point(x + d.x, y + d.y)); }
  Point operator - (Point d) { return (Point(x - d.x, y - d.y)); }
  Point operator - () { return (Point(-x, -y)); }
  Point operator * (double a) { return (Point(x * a, y * a)); }
  Point operator / (double a) { return (Point(x / a, y / a)); }
  
};

struct Segment
{
  Point p1, p2;
  
  Segment() {}
  Segment(Point p1, Point p2) : p1(p1), p2(p2) {}

  void input() { p1.input(); p2.input(); }
  
};

typedef Point Vector;
typedef vector < Point > Polygon;
typedef Segment Line;

double dot(Vector a, Vector b)
{
  return (a.x * b.x + a.y * b.y);
}

double cross(Vector a, Vector b)
{
  return (a.x * b.y - a.y * b.x);
}

Point project(Line s, Point p)
{
  Vector base = s.p2 - s.p1;
  return (s.p1 + base * (dot(p - s.p1, base) / base.norm()));
}

Point reflect(Line s, Point p)
{
  return (-p + project(s, p) * 2.0);
}


int main()
{
  int n;
  Line s;
  
  s.input();
  cin >> n;

  for(int i = 0; i < n; i++) {
    Point p;
    p.input();
    reflect(s, p).output();
  }
  
  
  return (0);
}