#include <bits/stdc++.h>
const int N = 1e4 + 5;
const long double PI = acos(-1);
struct Vec {
  long double x, y;
  long double dot(const Vec &b) const { return x * b.x + y * b.y; }
  Vec(long double x = 0.0, long double y = 0.0) : x(x), y(y) {}
  long double det(const Vec &b) const { return x * b.y - y * b.x; }
  Vec operator+(const Vec &b) const { return Vec(x + b.x, y + b.y); }
  Vec operator-(const Vec &b) const { return Vec(x - b.x, y - b.y); }
  void input() { std::cin >> x >> y; }
  Vec rotate(long double th) {
    return Vec(x * cos(th) - y * sin(th), y * cos(th) + x * sin(th));
  }
  void print() { printf("%.12f %.12f\n", double(x), double(y)); }
  long double dis() { return sqrt(x * x + y * y); }
} a[N], b[N];
int n, q, l = 1, r = 2;
long double tot = 0;
Vec p, rt, tl, tr;
int main() {
  scanf("%d%d", &n, &q);
  for (int i = 1; i <= n; i++) a[i].input();
  long double sl = 0;
  for (int i = 2; i < n; i++) {
    tl = a[i] - a[1];
    tr = a[i + 1] - a[1];
    long double s = fabs(tl.det(tr)) / 2;
    rt.x += (a[1].x + a[i].x + a[i + 1].x) / 3 * s;
    rt.y += (a[1].y + a[i].y + a[i + 1].y) / 3 * s;
    sl += s;
  }
  rt.x /= sl;
  rt.y /= sl;
  for (int i = 1; i <= n; i++) b[i] = a[i] - rt;
  int c, f, t;
  while (q--) {
    scanf("%d%d", &c, &f);
    if (c == 2) {
      tl = b[f].rotate(tot);
      (tl + rt).print();
    } else {
      scanf("%d", &t);
      int k = (f == l ? r : l);
      tl = b[k].rotate(tot);
      tr = tl + rt;
      long double tmp = atan2(tl.y, tl.x);
      if (tmp > PI / 2)
        tmp -= PI / 2, tmp = -tmp;
      else
        tmp = PI / 2 - tmp;
      rt = tr;
      rt.y -= b[k].dis();
      tot += tmp;
      if (l == f)
        l = t;
      else
        r = t;
    }
  }
  return 0;
}
