#include <bits/stdc++.h>
using namespace std;
pair<long double, long double> operator+(
    const pair<long double, long double> &a,
    const pair<long double, long double> &b) {
  return {a.first + b.first, a.second + b.second};
}
pair<long double, long double> operator-(
    const pair<long double, long double> &a,
    const pair<long double, long double> &b) {
  return {a.first - b.first, a.second - b.second};
}
double cross(const pair<long double, long double> &a,
             const pair<long double, long double> &b) {
  return a.first * b.second - a.second * b.first;
}
long double mymod(long double first) {
  return first - floor(first / (2 * acos(-1))) * (2 * acos(-1));
}
pair<long double, long double> cal(pair<long double, long double> q,
                                   pair<long double, long double> mid,
                                   long double angle) {
  q.second += angle;
  q.second = mymod(q.second);
  return make_pair(cos(q.second) * q.first, sin(q.second) * q.first) + mid;
}
int main() {
  int n, q;
  scanf("%d %d", &n, &q);
  pair<long double, long double> p[10005];
  pair<long double, long double> b[10005];
  pair<long double, long double> mid = make_pair(0, 0);
  double s = 0;
  for (int i = 1; i <= n; i++) {
    int first, second;
    scanf("%d %d", &first, &second);
    p[i] = make_pair(first, second);
  }
  for (int i = 2; i < n; i++) {
    pair<long double, long double> cen = p[1] + p[i] + p[i + 1];
    cen.first /= 3;
    cen.second /= 3;
    double ss = cross(p[i] - p[1], p[i + 1] - p[1]);
    s += ss;
    cen.first *= ss;
    cen.second *= ss;
    mid = mid + cen;
  }
  mid.first /= s;
  mid.second /= s;
  for (int i = 1; i <= n; i++) {
    p[i] = p[i] - mid;
    b[i].first = sqrt(p[i].first * p[i].first + p[i].second * p[i].second);
    b[i].second = mymod(atan2(p[i].second, p[i].first));
  }
  int pin[2] = {1, 2};
  long double angle = 0;
  while (q--) {
    int op;
    scanf("%d", &op);
    if (op == 1) {
      int first, second;
      scanf("%d %d", &first, &second);
      if (pin[1] == first) swap(pin[0], pin[1]);
      assert(pin[0] == first);
      pair<long double, long double> temp = cal(b[pin[1]], mid, angle);
      mid = make_pair(temp.first, temp.second - b[pin[1]].first);
      angle = mymod(acos(-1) / 2 - b[pin[1]].second);
      pin[0] = second;
    } else {
      int first;
      scanf("%d", &first);
      pair<long double, long double> ans = cal(b[first], mid, angle);
      printf("%.12lf %.12lf\n", (double)ans.first, (double)ans.second);
    }
  }
}
