#include <bits/stdc++.h>
const long long INF = 4e18L + 1;
const int IINF = 2e9 + 1;
const int limit = 1048576;
using namespace std;
unsigned int n;
bool comp(pair<unsigned int, unsigned int> a,
          pair<unsigned int, unsigned int> b) {
  return make_pair(a.first, n + 1 - a.second) <
         make_pair(b.first, n + 1 - b.second);
}
int main() {
  ios_base::sync_with_stdio(0);
  cin >> n;
  vector<pair<unsigned int, unsigned int> > edges_start(n - 3),
      edges_end(n - 3);
  for (auto& e : edges_start) {
    cin >> e.first >> e.second;
    if (e.first > e.second) swap(e.first, e.second);
  }
  for (auto& e : edges_end) {
    cin >> e.first >> e.second;
    if (e.first > e.second) swap(e.first, e.second);
  }
  sort((edges_start).begin(), (edges_start).end(), comp);
  sort((edges_end).begin(), (edges_end).end(), comp);
  vector<pair<unsigned int, unsigned int> > ans;
  for (auto e : edges_start)
    if (e.first != 1) ans.push_back(e);
  vector<bool> visited(n + 1, false);
  reverse((edges_end).begin(), (edges_end).end());
  for (auto e : edges_end) {
    if (e.first == 1)
      visited[e.second] = true;
    else
      for (int i = (int)e.first + 1; i < (int)e.second; i++)
        if (!visited[i]) {
          ans.push_back({1, i});
          visited[i] = true;
        }
  }
  cout << ans.size() << "\n";
  for (auto e : ans) cout << e.first << " " << e.second << "\n";
  return 0;
}
