#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
const int N = 1e4 + 4;
struct point {
  ld x, y;
  point() { x = y = 0; }
  point(ld X, ld Y) {
    x = X;
    y = Y;
  }
};
point operator*(point a, ld k) { return point(a.x * k, a.y * k); }
point operator+(point a, point b) { return point(a.x + b.x, a.y + b.y); }
point operator-(point a, point b) { return point(a.x - b.x, a.y - b.y); }
point p[N];
point gg[N];
ld rang[N];
ld sp(point a, point b) { return a.x * b.x + a.y * b.y; }
ld vp(point a, point b) { return a.x * b.y - a.y * b.x; }
ld area(point a, point b, point c) { return abs(vp(a - c, b - c)); }
ld ang(point a, point b) { return atan2(vp(a, b), sp(a, b)); }
point rotate(point v, ld angle) {
  point r(sin(angle), cos(angle));
  return point(vp(v, r), sp(v, r));
}
point getcur(int i, int f, point fp) {
  if (i == f) return fp;
  return rotate(p[i] - p[f], rang[f]) + fp;
}
point cross(point a, point b, point c, point d) {
  ld z = vp(b - a, d - c);
  ld k = vp(d - c, a - c) / z;
  return (b - a) * k + a;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.precision(9);
  cout << fixed;
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < n; ++i) cin >> p[i].x >> p[i].y;
  p[n] = p[0];
  ld all = 0, sx = 0, sy = 0;
  for (int i = 1; i + 1 < n; ++i) {
    ld tr = area(p[0], p[i], p[i + 1]);
    all += tr;
    sx += (p[0].x + p[i].x + p[i + 1].x) / 3 * tr;
    sy += (p[0].y + p[i].y + p[i + 1].y) / 3 * tr;
  }
  point c(sx / all, sy / all);
  for (int i = 0; i < n; ++i) rang[i] = ang(c - p[i], point(0, -1));
  int f1 = 0, f2 = 1;
  point g1 = p[f1];
  point g2 = p[f2];
  bool flag = false;
  while (m--) {
    int tp;
    cin >> tp;
    if (tp == 1) {
      int t1, t2;
      cin >> t1 >> t2;
      --t1;
      --t2;
      if (t1 == f1) {
        point g = getcur(t2, f2, g2);
        f1 = f2;
        g1 = g2;
        f2 = t2;
        g2 = g;
      } else {
        point g = getcur(t2, f1, g1);
        f2 = t2;
        g2 = g;
      }
      flag = true;
    } else {
      int i;
      cin >> i;
      --i;
      point res = (flag ? getcur(i, f1, g1) : p[i]);
      cout << res.x << ' ' << res.y << '\n';
    }
  }
  return 0;
}
