#include <bits/stdc++.h>   using namespace std;   const int inf = 1e8 + 10;   bool ok = 0;   int n, maxy, miny, maxx, minx;   struct point {     int x, y;   };   bool cmp(point a, point b) { return a.x < b.x; }   point jilu[100050];   int bfy[100050], afy[100050], bfmaxy[100050], bfminy[100050], afminy[100050],       afmaxy[100050];   int b1_search(long long tmp) {     int l = 0, r = n - 1, m;     while (r >= l) {       m = (l + r) >> 1;       if (jilu[m].x <= tmp)         l = m + 1;       else         r = m - 1;     }     return r;   }   int b2_search(long long tmp) {     int l = 0, r = n - 1, m;     while (r >= l) {       m = (r + l) >> 1;       if (jilu[m].x >= tmp)         r = m - 1;       else         l = m + 1;     }     return l;   }   long long binary_sqrt(long long tmp) {     long long ans = sqrt(tmp);     while (ans * ans > tmp) {       ans--;     }     while ((ans + 1) * (ans + 1) <= tmp) {       ans++;     }     return ans;   }   bool check(long long tmp) {     long long a = maxy - miny;     long long b = maxx - minx;     if (tmp >= a * a || tmp >= b * b) {       return 1;     }     int pos;     long long ttmp = binary_sqrt(tmp);     for (int i = 0; i < n; i++) {       if (jilu[i].x < 0) {         pos = b1_search(min(jilu[i].x + ttmp, (long long)-jilu[i].x));         long long my = max(bfy[i], afy[pos]);         long long mx =             max(max(jilu[i].x, -jilu[i].x), max(jilu[pos].x, -jilu[pos].x));         long long yy = max(afmaxy[pos], bfmaxy[i]) - min(afminy[pos], bfminy[i]);         if (my * my + mx * mx <= tmp && yy * yy <= tmp) {           return 1;         }       } else {         pos = b2_search(max(jilu[i].x - ttmp, (long long)-jilu[i].x));         long long my = max(afy[i], bfy[pos]);         long long mx =             max(max(jilu[i].x, -jilu[i].x), max(jilu[pos].x, -jilu[pos].x));         long long yy = max(afmaxy[i], bfmaxy[pos]) - min(afminy[i], bfminy[pos]);         if (my * my + mx * mx <= tmp && yy * yy <= tmp) {           return 1;         }       }     }     return 0;   }   void Binary_search(long long l, long long r) {     long long m;     while (r > l) {       m = l + (r - l) / 2;       if (check(m))         r = m;       else         l = m + 1;     }     cout << r << endl;   }   int main() {     scanf( %d , &n);     for (int i = 0; i < n; i++) {       scanf( %d%d , &jilu[i].x, &jilu[i].y);     }     sort(jilu, jilu + n, cmp);     bfmaxy[0] = -inf;     bfminy[0] = inf;     for (int i = 1; i < n; i++) {       bfmaxy[i] = max(bfmaxy[i - 1], jilu[i - 1].y);       bfminy[i] = min(bfminy[i - 1], jilu[i - 1].y);     }     afmaxy[n - 1] = -inf;     afminy[n - 1] = inf;     for (int i = n - 2; i >= 0; i--) {       afmaxy[i] = max(afmaxy[i + 1], jilu[i + 1].y);       afminy[i] = min(afminy[i + 1], jilu[i + 1].y);     }     for (int i = 1; i < n; i++) {       bfy[i] =           max(max(bfy[i - 1], -bfy[i - 1]), max(jilu[i - 1].y, -jilu[i - 1].y));     }     for (int i = n - 2; i >= 0; i--) {       afy[i] =           max(max(afy[i + 1], -afy[i + 1]), max(jilu[i + 1].y, -jilu[i + 1].y));     }     maxy = miny = jilu[0].y;     maxx = minx = jilu[0].x;     for (int i = 0; i < n; i++) {       maxy = max(jilu[i].y, maxy);       miny = min(jilu[i].y, miny);       maxx = max(jilu[i].x, maxx);       minx = min(jilu[i].x, minx);     }     Binary_search(0, 40000000000000000);   }