#include <bits/stdc++.h>
template <class T>
bool chmax(T &a, const T &b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
bool chmin(T &a, const T &b) {
  if (b < a) {
    a = b;
    return 1;
  }
  return 0;
}
using namespace std;
const long double eps = 1e-8;
const long double pi = acos(-1.0);
int sgn(long double x) { return (x > eps) - (x < -eps); }
int cmp(long double x, long double y) { return sgn(x - y); }
struct P {
  long double x, y;
  P() : x(0), y(0) {}
  P(long double a, long double b) : x(a), y(b) {}
  void in() {
    int a, b;
    scanf("%d%d", &a, &b);
    x = a;
    y = b;
  }
  P operator+(const P &a) const { return P(x + a.x, y + a.y); }
  P operator-(const P &a) const { return P(x - a.x, y - a.y); }
  P operator*(const long double &a) const { return P(x * a, y * a); }
  P operator/(const long double &a) const { return P(x / a, y / a); }
  long double norm() { return sqrt(x * x + y * y); }
  long double norm2() { return x * x + y * y; }
};
long double dot(P a, P b) { return a.x * b.x + a.y * b.y; }
long double cross(P a, P b) { return a.x * b.y - a.y * b.x; }
long double area(vector<P> a) {
  P a0 = a[0];
  for (auto &p : a) p = p - a0;
  int n = a.size();
  long double sum = 0;
  for (int i = 0; i <= n - 1; i++) sum += cross(a[i], a[(i + 1) % n]);
  return sum / 2;
}
P center(vector<P> a) {
  P a0 = a[0];
  for (auto &p : a) p = p - a0;
  int n = a.size();
  P ans(0, 0);
  long double S = area(a);
  if (sgn(S) == 0) return ans;
  for (int i = 0; i <= n - 1; i++)
    ans =
        ans + (a[i] + a[(i + 1) % n]) * (cross(a[i], a[(i + 1) % n]) / (S * 6));
  return ans + a0;
}
long double getang(long double x) {
  while (x < 0) x += pi * 2;
  while (x >= pi * 2) x -= pi * 2;
  return x;
}
int main() {
  int n, q;
  scanf("%d%d", &n, &q);
  vector<P> A(n);
  for (int i = 0; i <= n - 1; i++) A[i].in();
  P c = center(A);
  vector<long double> ang(n + 1), len(n + 1);
  for (int i = 0; i <= n - 1; i++) {
    P p = A[i] - c;
    ang[i + 1] = getang(atan2(p.y, p.x));
    len[i + 1] = p.norm();
  }
  long double theta = pi / 2;
  int pin = 1 ^ 2;
  auto getp = [&](int i) {
    long double s = getang(ang[i] - theta + pi / 2);
    return c + P(cos(s), sin(s)) * len[i];
  };
  while (q--) {
    int op;
    scanf("%d", &op);
    if (op == 1) {
      int f, t;
      scanf("%d%d", &f, &t);
      pin ^= f;
      P p = getp(pin);
      theta = ang[pin];
      c = p + P(0, -1) * len[pin];
      pin ^= t;
    } else {
      int id;
      scanf("%d", &id);
      P p = getp(id);
      printf("%.10f %.10f\n", (double)p.x, (double)p.y);
    }
  }
  return 0;
}
