func_code_string: #include <bits/stdc++.h>   using namespace std;   const int MAX_N = 100000 + 1;   const int INF = numeric_limits<int>::max() / 2;   pair<int, int> P[MAX_N];   pair<int, int> prefix[MAX_N], suffix[MAX_N];   int N;   long long square(int first) { return 1LL * first * first; }   bool valid(long long M) {     long long bestY, bestXY;     int i = 1, j = 1;     while (i <= N) {       while (square(P[i].first - P[j].first) > M) j++;       assert(j <= i);       assert(square(P[i].first - P[j].first) <= M);       int maxY = -INF;       int minY = INF;       bool changed = false;       if (j > 1) {         changed = true;         minY = min(minY, prefix[j - 1].first);         maxY = max(maxY, prefix[j - 1].second);       }       if (i < N) {         changed = true;         minY = min(minY, suffix[i + 1].first);         maxY = max(maxY, suffix[i + 1].second);       }       if (changed) {         bestY = square(maxY - minY);         bestXY = max(square(maxY), square(minY)) +                  max(square(P[i].first), square(P[j].first));       } else         bestY = 0, bestXY = 0;       if (bestY <= M && bestXY <= M) return true;       i++;     }     return false;   }   void makePrefixSuffix() {     pair<int, int> p = {INF, -INF};     for (int i = 1; i <= N; ++i) {       p.first = min(p.first, P[i].second);       p.second = max(p.second, P[i].second);       prefix[i] = p;     }     p = {INF, -INF};     for (int i = N; i >= 1; i--) {       p.first = min(p.first, P[i].second);       p.second = max(p.second, P[i].second);       suffix[i] = p;     }   }   long long binarySearch() {     long long l = 0;     long long r = 1LL * INF * INF >> 1;     long long sol = -1;     while (l <= r) {       long long m = (l + r) / 2;       if (valid(m)) {         sol = m;         r = m - 1;       } else         l = m + 1;     }     return sol;   }   int main() {     ios_base::sync_with_stdio(false);     cin >> N;     for (int i = 1; i <= N; ++i) cin >> P[i].first >> P[i].second;     sort(P + 1, P + N + 1);     makePrefixSuffix();     long long sol1 = binarySearch();     for (int i = 1; i <= N; ++i) swap(P[i].first, P[i].second);     sort(P + 1, P + N + 1);     makePrefixSuffix();     long long sol2 = binarySearch();     cout << min(sol1, sol2) <<   n ;     return 0;   }   