func_code_string: #include <bits/stdc++.h>   using namespace std;   int main() {     ios::sync_with_stdio(false);     long long t, n, i, j, flag = 0, temp, nodes, a, b, m, k, sz, sm, res;     long long mn, mx;     long long l, r;     long long x, y, z;     long long c, d;     t = 1;     vector<pair<int, int>> v;     string s;     char ch;     while (t--) {       flag = 0;       v.clear();       cin >> n;       int A = INT_MAX, B = INT_MIN;       for (i = 0; i < n; i++) {         cin >> a >> b;         v.push_back({a, b});         if (a < A) A = a;         if (B < b) B = b;       }       for (i = 0; i < v.size(); i++) {         if (v[i].first == A && v[i].second == B) {           flag = 1;           break;         }       }       if (flag == 1) {         cout << i + 1 << endl;         continue;       } else {         cout <<  -1 ;         continue;       }     }     return 0;   }   