#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-6;
const int MAXN = 1e4 + 7;
int sign(double x) {
  if (fabs(x) <= eps) return 0;
  if (x > 0)
    return 1;
  else
    return -1;
}
struct Point {
  double x, y;
  Point() {}
  Point(double _x, double _y) {
    x = _x;
    y = _y;
  }
  Point operator+(const Point &b) const { return Point(x + b.x, y + b.y); }
  Point operator-(const Point &b) const { return Point(x - b.x, y - b.y); }
  Point operator*(const double &k) const { return Point(x * k, y * k); }
  Point operator/(const double &k) const { return Point(x / k, y / k); }
  double operator*(const Point &b) const { return x * b.x + y * b.y; }
  double operator^(const Point &b) const { return x * b.y - y * b.x; }
  Point base() const {
    if (sign(x) == -1 || (sign(x) == 0 && sign(y) == -1)) return Point(-x, -y);
    return *this;
  }
  bool operator<(const Point &a) const {
    Point p1 = base(), p2 = a.base();
    return p1.x * p2.y < p2.y * p1.y;
  }
  double powlen() { return x * x + y * y; };
  double len() { return sqrt(powlen()); }
};
double cross(Point a, Point b) { return a.x * b.y - a.y * b.x; }
double dot(Point a, Point b) { return a.x * b.x + a.y * b.y; }
double get_s(Point a, Point b, Point c) {
  return ((b.x - a.x) * (c.y - a.y) + (c.x - a.x) * (b.y - a.y)) / 2.0;
}
Point p[MAXN];
double ag[MAXN], r[MAXN], rad;
int n, q;
int main() {
  int n, q;
  scanf("%d%d", &n, &q);
  for (int i = 1; i <= n; i++) {
    scanf("%lf%lf", &p[i].x, &p[i].y);
  }
  double xg, yg, sum = 0, tx = 0, ty = 0;
  for (int i = 2; i <= n - 1; i++) {
    xg = (p[1].x + p[i].x + p[i + 1].x) / 3.0;
    yg = (p[1].y + p[i].y + p[i + 1].y) / 3.0;
    double s = cross(p[i] - p[1], p[i + 1] - p[1]) / 2.0;
    tx += xg * s;
    ty += yg * s;
    sum += s;
  }
  xg = tx / sum;
  yg = ty / sum;
  for (int i = 1; i <= n; i++) {
    r[i] = sqrt((p[i].x - xg) * (p[i].x - xg) + (p[i].y - yg) * (p[i].y - yg));
    ag[i] = atan2((p[i].y - yg), (p[i].x - xg));
  }
  int pin[2] = {1, 2};
  double px[2] = {p[1].x, p[2].x};
  double py[2] = {p[1].y, p[2].y};
  int op, f, t, pos;
  while (q--) {
    scanf("%d", &op);
    if (op == 1) {
      scanf("%d%d", &f, &t);
      if (f == pin[0])
        pos = 1, pin[0] = t;
      else
        pos = 0, pin[1] = t;
      xg = px[pos];
      yg = py[pos] - r[pin[pos]];
      rad = atan(1) * 2.0 - ag[pin[pos]];
      px[pos ^ 1] = xg + r[t] * cos(rad + ag[t]);
      py[pos ^ 1] = yg + r[t] * sin(rad + ag[t]);
    } else if (op == 2) {
      scanf("%d", &pos);
      double tx = xg + r[pos] * cos(rad + ag[pos]);
      double ty = yg + r[pos] * sin(rad + ag[pos]);
      printf("%.10f %.10f\n", tx, ty);
    }
  }
  return 0;
}
