#include <bits/stdc++.h>
using namespace std;
#pragma GCC diagnostic ignored "-Wmissing-declarations"
double triangle_area(const complex<double> p1, const complex<double> p2,
                     const complex<double> p3) {
  return abs((p2.real() - p1.real()) * (p3.imag() - p1.imag()) -
             (p2.imag() - p1.imag()) * (p3.real() - p1.real())) /
         2.0;
}
pair<double, complex<double> > getCenter(const complex<double> a,
                                         const complex<double> b,
                                         const complex<double> c) {
  complex<double> res;
  res += a;
  res += b;
  res += c;
  return {triangle_area(a, b, c), res / 3.0};
}
complex<double> getCenter(const vector<complex<double> >& v) {
  double area = 0;
  complex<double> res;
  const int n = v.size();
  for (int i = 1; i + 1 < n; ++i) {
    auto p = getCenter(v[0], v[i], v[i + 1]);
    area += p.first;
    res += p.second * p.first;
  }
  return res / area;
}
double getDist(const complex<double> p1, const complex<double> p2) {
  return norm(p1 - p2);
}
int main() {
  ios_base::sync_with_stdio(false);
  int n, q;
  cin >> n >> q;
  vector<complex<double> > v(n);
  for (auto& p : v) {
    double x, y;
    cin >> x >> y;
    p = {x, y};
  }
  complex<double> center = getCenter(v);
  stringstream out;
  out << fixed << setprecision(10);
  int curP = 1;
  for (auto& p : v) p -= center;
  complex<double> angle = 1.0;
  while (q--) {
    int type;
    cin >> type;
    if (type == 1) {
      int f;
      cin >> f;
      --f;
      curP ^= f;
      complex<double> p1 = center + angle * v[curP];
      complex<double> np{p1.real(), p1.imag() - abs(v[curP])};
      angle = complex<double>{0, abs(v[curP])} / v[curP];
      center = np;
      int t;
      cin >> t;
      --t;
      curP ^= t;
    } else {
      int t;
      cin >> t;
      --t;
      complex<double> p = center + angle * v[t];
      out << p.real() << ' ' << p.imag() << '\n';
    }
  }
  cout << out.str();
}
