#include <bits/stdc++.h>
using namespace std;
const int mx = 2e5 + 10;
int n, m, ma = -1e9, pos;
double xi[mx], yi[mx], angle[mx], X, Y;
double mi, dis[mx];
double cross(int p1, int p2, int c) {
  return (xi[p1] - xi[c]) * (yi[p2] - yi[c]) -
         (xi[p2] - xi[c]) * (yi[p1] - yi[c]);
}
int main() {
  scanf("%d%d", &n, &m);
  int up = 0, a, b, c, down;
  for (int i = 1; i <= n; i++) scanf("%lf%lf", xi + i, yi + i);
  double sum1 = 0, sum2 = 0, ret = 0;
  for (int i = 2; i < n; i++) {
    mi = fabs(cross(1, i, i + 1));
    ret += mi;
    sum1 += (xi[1] + xi[i] + xi[i + 1]) / 3 * mi;
    sum2 += (yi[1] + yi[i] + yi[i + 1]) / 3 * mi;
  }
  X = sum1 / ret;
  Y = sum2 / ret;
  for (int i = 1; i <= n; i++) {
    angle[i] = atan2(yi[i] - Y, xi[i] - X);
    if (angle[i] < 0) angle[i] = 2 * 3.1415926536 + angle[i];
  }
  for (int i = 1; i <= n; i++) dis[i] = hypot(xi[i] - X, yi[i] - Y);
  while (m--) {
    scanf("%d", &a);
    if (a == 1) {
      scanf("%d%d", &b, &c);
      swap(down, c);
      if (!up) {
        up = b == 1 ? 2 : 1;
        X = xi[up], Y = yi[up] - dis[up];
      } else if (b == up) {
        double v = angle[b] - angle[c];
        if (v < 0) v = 2 * 3.1415926536 + v;
        xi[c] = X + dis[c] * sin(v);
        yi[c] = Y + dis[c] * cos(v);
        X = xi[c], Y = yi[c] - dis[c];
        up = c;
      }
    } else {
      scanf("%d", &c);
      if (!up) {
        printf("%.10f %.10f\n", xi[c], yi[c]);
        continue;
      }
      double v = angle[up] - angle[c];
      if (v < 0) v = 2 * 3.1415926536 + v;
      xi[c] = X + dis[c] * sin(v);
      yi[c] = Y + dis[c] * cos(v);
      printf("%.10f %.10f\n", xi[c], yi[c]);
    }
  }
  return 0;
}
