#include <bits/stdc++.h>
using namespace std;
const long double pi = acosl(-1.0);
struct P {
  long double x, y;
  P() {}
  P(long double x, long double y) : x(x), y(y) {}
  void read() {
    double _x, _y;
    scanf("%lf%lf", &_x, &_y);
    x = _x;
    y = _y;
  }
  P operator+(const P &b) const { return P(x + b.x, y + b.y); }
  P operator-(const P &b) const { return P(x - b.x, y - b.y); }
  P operator*(const long double &d) const { return P(x * d, y * d); }
  P operator/(const long double &d) const { return P(x / d, y / d); }
  long double operator*(const P &b) const { return x * b.x + y * b.y; }
  long double operator/(const P &b) const { return x * b.y - y * b.x; }
  long double norm() const { return (*this) * (*this); }
  long double abs() const { return sqrt(norm()); }
  long double ang() const { return atan2(y, x); }
};
long double get_ang(const P &p) { return -(p.ang() + pi / 2.); }
P gravity(vector<P> p) {
  P o = p[0], g(0, 0);
  for (int i = (0); i < (((int)(p).size())); ++i) p[i] = p[i] - o;
  p.push_back(p[0]);
  long double area = 0;
  for (int i = (0); i < (((int)(p).size()) - 1); ++i) {
    long double tmp = p[i] / p[i + 1];
    g = g + (p[i] + p[i + 1]) * tmp;
    area += tmp;
  }
  return g / (3. * area) + o;
}
const int N = 1e4 + 7;
int n, q;
long double tot_ang = 0.;
long double ang[N], dis[N];
vector<P> p;
P g;
P get_real(int id) {
  long double ang = ::ang[id] + tot_ang;
  return P(cos(ang) * dis[id], sin(ang) * dis[id]);
}
int main() {
  scanf("%d%d", &n, &q);
  p.resize(n);
  for (int i = (0); i < (n); ++i) p[i].read();
  g = gravity(p);
  for (int i = (0); i < (n); ++i) {
    p[i] = p[i] - g;
    ang[i] = p[i].ang();
    dis[i] = p[i].abs();
  }
  int p1 = 0, p2 = 1;
  for (int i = (0); i < (q); ++i) {
    int op;
    scanf("%d", &op);
    if (op == 2) {
      int id;
      scanf("%d", &id), id--;
      P ans = get_real(id) + g;
      printf("%.16f %.16f\n", double(ans.x), double(ans.y));
    } else {
      int f, t;
      scanf("%d%d", &f, &t), f--, t--;
      if (p1 == f) swap(p1, p2);
      p2 = t;
      P pivot = get_real(p1);
      tot_ang += get_ang(pivot) + pi;
      while (tot_ang > 2. * pi) tot_ang -= 2. * pi;
      while (tot_ang < 0) tot_ang += 2. * pi;
      g = g + P(pivot.x, pivot.y - dis[p1]);
    }
  }
  return 0;
}
