#include <bits/stdc++.h>
struct pt {
  long double x, y;
};
int N, Q;
pt p[1 << 18];
long double dist[1 << 18], angle[1 << 18];
pt centroid(pt p[], int n) {
  long double area = 0.0;
  pt c = {};
  for (int i = 0; i < n; ++i) {
    pt a = p[i], b = p[i + 1];
    long double t = a.x * b.y - a.y * b.x;
    area += t;
    c.x += (a.x + b.x) * t;
    c.y += (a.y + b.y) * t;
  }
  area *= (long double)0.5;
  c.x /= (area * (long double)6);
  c.y /= (area * (long double)6);
  return c;
}
pt get_pt(int ind, pt center, long double ang) {
  pt r;
  r.x = center.x + dist[ind] * std::cos(ang + angle[ind]);
  r.y = center.y + dist[ind] * std::sin(ang + angle[ind]);
  return r;
}
long double get_dist(pt a, pt b) {
  a.x -= b.x;
  a.y -= b.y;
  return std::sqrt(a.x * a.x + a.y * a.y);
}
int main() {
  long double const PI = std::acos((long double)-1.0);
  scanf("%d%d", &N, &Q);
  for (int i = 0; i < N; ++i) {
    double x, y;
    scanf("%lf %lf", &x, &y);
    p[i].x = x;
    p[i].y = y;
  }
  const pt z = p[0];
  for (int i = 0; i < N; ++i) {
    p[i].x -= z.x;
    p[i].y -= z.y;
  }
  p[N] = p[0];
  pt center = centroid(p, N);
  for (int i = 0; i < N; ++i) {
    dist[i] = get_dist(p[i], center);
    angle[i] = atan2(p[i].y - center.y, p[i].x - center.x);
    if (angle[i] < 0) angle[i] += 2 * PI;
  }
  int fi = 0, fj = 1;
  long double cur_ang = 0.0;
  for (int q = 0; q < Q; ++q) {
    int type = 0;
    scanf("%d", &type);
    if (type == 1) {
      int x, y;
      scanf("%d%d", &x, &y);
      --x, --y;
      pt top, nxt;
      if (x == fi) {
        fi = y;
        top = get_pt(fj, center, cur_ang);
        nxt = pt{top.x, top.y - dist[fj]};
      } else {
        fj = y;
        top = get_pt(fi, center, cur_ang);
        nxt = pt{top.x, top.y - dist[fi]};
      }
      cur_ang += -PI / 2.0 - atan2(center.y - top.y, center.x - top.x);
      while (cur_ang < 0) cur_ang += 2 * PI;
      while (cur_ang > 2 * PI) cur_ang -= 2 * PI;
      center = nxt;
    } else {
      int x = 0;
      scanf("%d", &x);
      --x;
      pt r = get_pt(x, center, cur_ang);
      printf("%.10f %.10f\n", (double)(r.x + z.x), (double)(r.y + z.y));
    }
  }
  return 0;
}
