#include <bits/stdc++.h>
const double eps = 1e-3;
using namespace std;
int dcmp(double x) {
  if (fabs(x) < eps)
    return 0;
  else
    return x < 0 ? -1 : 1;
}
struct Point {
  double x, y;
  Point(double x = 0, double y = 0) : x(x), y(y) {}
  void read() { scanf("%lf%lf", &x, &y); }
};
Point a[10010];
int g[10010];
double c[10010], L[10010];
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 operator*(Point a, double b) { return Point(a.x * b, a.y * b); }
Point operator/(Point a, double b) { return Point(a.x / b, a.y / b); }
double Dot(Point a, Point b) { return a.x * b.x + a.y * b.y; }
double Length(Point a) { return sqrt(Dot(a, a)); }
double Cross(Point a, Point b) { return a.x * b.y - a.y * b.x; }
Point Rotate(Point a, double rad) {
  return Point(a.x * cos(rad) - a.y * sin(rad),
               a.x * sin(rad) + a.y * cos(rad));
}
Point Zhongxin(Point *a, int n) {
  Point ans = Point(0, 0);
  double ss = 0;
  a[n] = a[0];
  for (int i = 1; i < n - 1; i++) {
    double s = fabs(Cross(a[i] - a[0], a[i + 1] - a[0]));
    ans = ans + (a[0] + a[i] + a[i + 1]) * s / 3;
    ss += s;
  }
  if (dcmp(ss) == 0) return Point(0, 0);
  return ans / ss;
}
double GetAngle(Point a) { return atan2(a.x, a.y); }
int main() {
  int n, m;
  double ang = 0;
  g[0] = g[1] = 1;
  int a1 = 0, a2 = 1;
  scanf("%d%d", &n, &m);
  for (int i = 0; i < n; i++) a[i].read();
  Point cc = Zhongxin(a, n);
  for (int i = 0; i < n; i++) a[i] = a[i] - cc;
  for (int i = 1; i <= m; i++) {
    int fg, j, k;
    scanf("%d%d", &fg, &j);
    if (fg & 1) {
      scanf("%d", &k);
      j--;
      k--;
      g[j]--;
      if (!g[j]) {
        int k = j == a1 ? a2 : a1;
        Point t = cc + Rotate(a[k], ang);
        double r = GetAngle(t - cc);
        cc = t + Point(0, -1) * Length(a[k]);
        ang += r;
      }
      if (j == a1)
        a1 = k;
      else
        a2 = k;
      g[k]++;
    } else {
      Point t = cc + Rotate(a[j - 1], ang);
      double x = t.x, y = t.y;
      printf("%.8f %.8f\n", x, y);
    }
  }
}
