#include <bits/stdc++.h>   using namespace std;   int main() {     int n;     cin >> n;     vector<pair<int, int> > p;     int a[n + 1], b[n + 1];     for (int i = 1; i <= n; i++) cin >> a[i];     for (int i = 1; i <= n; i++) cin >> b[i];     for (int i = 1; i <= n; i++) {       if (a[i] != b[i]) {         for (int j = i + 1; j <= n; j++) {           if (a[i] == b[j]) {             for (int k = j; k > i; k--) {               p.push_back(make_pair(k - 1, k));               swap(b[k], b[k - 1]);             }             break;           }         }       }     }     cout << p.size() << endl;     for (int i = 0; i < p.size(); i++)       cout << p[i].first <<     << p[i].second << endl;   }   