#include <bits/stdc++.h>
using namespace std;
vector<pair<int, int> > ans;
int num[((int)1010)];
void solve(vector<pair<int, int> > now, vector<pair<int, int> > fin,
           vector<int> index) {
  if (!now.size()) return;
  int n = index.size();
  int x, y, val = ((int)1010);
  for (int i = 0; i < n; i++) num[index[i]] = i;
  for (auto u : fin) {
    int ex = abs(num[u.second] - num[u.first] - n / 2);
    if (ex < val) val = ex, x = u.first, y = u.second;
  }
  bool flg = 0;
  for (auto u : now)
    if (u.first == x && u.second == y) {
      flg = 1;
      break;
    }
  if (!flg) {
    vector<pair<int, int> > now_ex;
    vector<pair<int, pair<int, int> > > ex;
    for (auto u : now) {
      if (((u.first >= x && u.first <= y) &&
           (u.second >= x && u.second <= y)) ||
          ((u.first >= y || u.first <= x) && (u.second >= y || u.second <= x)))
        now_ex.push_back(u);
      else {
        int p = u.first, q = u.second;
        if (q >= x && q <= y) swap(p, q);
        int val = p - x;
        if (q >= y) q -= ((int)1010);
        val += x - q;
        ex.push_back({val, u});
      }
    }
    sort(ex.begin(), ex.end());
    for (int i = 0; i < (int)ex.size() - 1; i++) {
      pair<int, int> u = ex[i].second;
      ans.push_back(u);
      int v = ex[i + 1].second.first;
      if (v == u.first || v == u.second) v = ex[i + 1].second.second;
      now_ex.push_back({min(x, v), max(x, v)});
    }
    ans.push_back(ex.back().second);
    now_ex.push_back({x, y});
    now = now_ex;
  }
  vector<pair<int, int> > now1, now2, fin1, fin2;
  vector<int> index1, index2;
  for (auto u : now) {
    if (u.first >= x && u.second <= y) {
      if (u.first != x || u.second != y) now1.push_back(u);
    } else
      now2.push_back(u);
  }
  for (auto u : fin) {
    if (u.first >= x && u.second <= y) {
      if (u.first != x || u.second != y) fin1.push_back(u);
    } else
      fin2.push_back(u);
  }
  for (auto u : index) {
    if (u >= x && u <= y) index1.push_back(u);
    if (u <= x || u >= y) index2.push_back(u);
  }
  solve(now1, fin1, index1);
  solve(now2, fin2, index2);
}
int main() {
  int n;
  cin >> n;
  vector<pair<int, int> > now, fin;
  vector<int> index;
  for (int i = 0; i < n; i++) index.push_back(i);
  for (int i = 0; i < n - 3; i++) {
    int x, y;
    cin >> x >> y;
    now.push_back({min(x - 1, y - 1), max(x - 1, y - 1)});
  }
  for (int i = 0; i < n - 3; i++) {
    int x, y;
    cin >> x >> y;
    fin.push_back({min(x - 1, y - 1), max(x - 1, y - 1)});
  }
  solve(now, fin, index);
  cout << ans.size() << "\n";
  for (auto u : ans) cout << u.first + 1 << " " << u.second + 1 << "\n";
  return 0;
}
