#include <bits/stdc++.h>
using namespace std;
const long double eps = 1e-15;
const long double PI = acos(-1.0);
int sgn(long double x) {
  if (fabs(x) < eps) return 0;
  if (x < 0)
    return -1;
  else
    return 1;
}
struct Point {
  long double x, y;
  Point() {}
  Point(long double _x, long double _y) : x(_x), y(_y) {}
  void input() { scanf("%Lf%Lf", &x, &y); }
  Point operator-(const Point &b) const { return Point(x - b.x, y - b.y); }
  long double operator^(const Point &b) const { return x * b.y - y * b.x; }
  long double operator*(const Point &b) const { return x * b.x + y * b.y; }
  void transXY(long double B) {
    long double tx = x, ty = y;
    x = tx * cos(B) - ty * sin(B);
    y = tx * sin(B) + ty * cos(B);
  }
};
Point p[10010];
long double dist(Point a, Point b) { return sqrt((a - b) * (a - b)); }
long double CalcArea(int n) {
  long double res = 0;
  for (int i = 0; i < n; i++) res += (p[i] ^ p[(i + 1) % n]) / 2;
  return fabs(res);
}
Point MassCenter(int n, long double area) {
  Point ans = Point(0, 0);
  if (sgn(area) == 0) return ans;
  for (int i = 0; i < n - 1; i++) {
    long double tmp = p[i] ^ p[i + 1];
    ans.x += (p[i].x + p[i + 1].x) * tmp;
    ans.y += (p[i].y + p[i + 1].y) * tmp;
  }
  long double tmp = p[n - 1] ^ p[0];
  ans.x += (p[n - 1].x + p[0].x) * tmp;
  ans.y += (p[n - 1].y + p[0].y) * tmp;
  ans.x /= area;
  ans.x /= 6.0;
  ans.y /= area;
  ans.y /= 6.0;
  return ans;
}
int now[10010];
long double len[10010];
long double al[10010];
int main() {
  int n, q;
  scanf("%d%d", &n, &q);
  p[0].input();
  now[0] = 0;
  Point ex = p[0];
  p[0] = Point(0.0, 0.0);
  for (int i = 1; i < n; i++) {
    p[i].input();
    now[i] = 0;
    p[i].x -= ex.x;
    p[i].y -= ex.y;
  }
  long double area = CalcArea(n);
  Point center = MassCenter(n, area);
  center.x += ex.x;
  center.y += ex.y;
  for (int i = 0; i < n; i++) {
    p[i].x += ex.x;
    p[i].y += ex.y;
    al[i] = atan2(p[i].y - center.y, p[i].x - center.x);
    len[i] = dist(p[i], center);
  }
  int pin1 = 0, pin2 = 1;
  int pre = -1;
  long double st = atan2(-1, 0);
  while (q--) {
    int ty;
    scanf("%d", &ty);
    if (ty == 1) {
      int f, t;
      scanf("%d%d", &f, &t);
      f--;
      t--;
      int cur;
      if (pin1 == f)
        cur = pin2;
      else
        cur = pin1;
      if (pre == -1) {
        center.x -= p[cur].x;
        center.y -= p[cur].y;
        long double alpha = st - atan2(center.y, center.x);
        center.transXY(alpha);
        center.x += p[cur].x;
        center.y += p[cur].y;
      } else {
        Point pp = Point(0.0, len[cur]);
        pp.transXY(al[cur] - al[pre]);
        center.x += pp.x;
        center.y += pp.y - len[cur];
      }
      pre = cur;
      if (pin1 == f)
        pin1 = t;
      else
        pin2 = t;
    } else {
      int x;
      scanf("%d", &x);
      x--;
      if (pre == -1)
        printf("%.10Lf %.10Lf\n", p[x].x, p[x].y);
      else {
        Point pp = Point(0.0, len[x]);
        pp.transXY(al[x] - al[pre]);
        pp.x += center.x;
        pp.y += center.y;
        printf("%.10Lf %.10Lf\n", pp.x, pp.y);
      }
    }
  }
}
