#include <bits/stdc++.h>
using namespace std;
const int oo = 2139063143;
const int N = 1010000;
const int P = 1000000007;
const long double eps = 1e-7;
template <typename T>
inline void sc(T &x) {
  x = 0;
  static int p;
  p = 1;
  static char c;
  c = getchar();
  while (!isdigit(c)) {
    if (c == '-') p = -1;
    c = getchar();
  }
  while (isdigit(c)) {
    x = (x << 1) + (x << 3) + (c - 48);
    c = getchar();
  }
  x *= p;
}
template <typename T>
inline void print(T x) {
  if (x < 0) putchar('-'), x = -x;
  if (x >= 10) print(x / 10);
  putchar(x % 10 + '0');
}
template <typename T>
inline void pr(T x) {
  print(x), putchar('\n');
}
template <typename T1, typename T2>
void chkmax(T1 &A, T2 B) {
  A = A >= B ? A : B;
}
template <typename T1, typename T2>
void chkmin(T1 &A, T2 B) {
  A = A <= B ? A : B;
}
const long double PI = acos(-1);
int n, m;
struct po {
  long double x, y;
  po(long double xx = 0, long double yy = 0) { x = xx, y = yy; }
} a[N], s[N];
po operator+(po A, po B) { return po(A.x + B.x, A.y + B.y); }
po operator-(po A, po B) { return po(A.x - B.x, A.y - B.y); }
long double operator*(po A, po B) { return A.x * B.y - A.y * B.x; }
po operator*(po A, long double B) { return po(A.x * B, A.y * B); }
po operator*(long double B, po A) { return po(A.x * B, A.y * B); }
long double triangle(po A, po B, po C) { return abs((B - A) * (C - A)) / 2; }
long double area() {
  long double g = a[n] * a[1];
  for (int i = 1; i < n; i++) g += a[i] * a[i + 1];
  return abs(g) / 2;
}
po core(po A, po B, po C) { return (A + B + C) * (1. / 3); }
po O;
void core() {
  long double S = area();
  for (int i = 2; i < n; i++)
    O = O + (triangle(a[1], a[i], a[i + 1]) / S) * core(a[1], a[i], a[i + 1]);
}
long double S(long double A) { return A * A; }
long double getlen(po A) { return sqrt(S(A.x) + S(A.y)); }
long double len[N], b[N];
long double atan2(po A) { return atan2(A.y, A.x); }
po rotate(po A, long double x) {
  long double s = sin(x), c = cos(x);
  return po(A.x * c - A.y * s, A.x * s + A.y * c);
}
int ia = 1, ib = 2;
po A, B, p;
po getpos(int i) { return O + rotate(s[i], b[0] - b[ia]); }
int main() {
  sc(n), sc(m);
  for (int i = 1; i <= n; i++) {
    int x, y;
    sc(x), sc(y);
    a[i] = po(x, y);
  }
  core();
  for (int i = 1; i <= n; i++)
    s[i] = a[i] - O, len[i] = getlen(s[i]), b[i] = atan2(s[i]);
  b[0] = atan2(po(0, 1));
  A = a[1], B = a[2];
  bool fg = 0;
  while (m--) {
    int op, x, y;
    sc(op), sc(x);
    if (op == 1) {
      sc(y);
      if (ia == x) swap(ia, ib), swap(A, B);
      O = po(A.x, A.y - len[ia]);
      ib = y, B = getpos(ib);
      fg = 1;
    } else {
      if (fg)
        p = getpos(x), printf("%.9Lf %.9Lf\n", p.x, p.y);
      else
        printf("%.9Lf %.9Lf\n", a[x].x, a[x].y);
    }
  }
  return 0;
}
