func_code_string: #include <bits/stdc++.h>   using namespace std;   const int N = 5e3 + 10;   int ad[N][N];   long long n;   pair<int, int> t[N];   bool ok;   int c[N];   void connect(int k) {     for (int i = 0; i < n; i++) {       for (int j = i + 1; j < n; j++) {         if (abs(t[i].first - t[j].first) + abs(t[i].second - t[j].second) > k)           ad[i][j] = ad[j][i] = 1;         else           ad[i][j] = ad[j][i] = 0;       }     }   }   void dfs(int v, int col) {     c[v] = col;     for (int i = 0; i < n; i++) {       if (ad[v][i] && c[i] == 0)         dfs(i, 3 - col);       else if (ad[v][i] && c[i] == col) {         ok = 0;         return;       }     }   }   int tt = 10000;   int bs() {     long long top = 10100, low = 0;     while (top > low + 1) {       int md = (low + top) / 2;       connect(md);       ok = true;       for (int i = 0; i < n; i++) c[i] = 0;       for (int i = 0; i < n; i++) {         if (!c[i]) {           dfs(i, 1);         }       }       if (ok)         top = md;       else         low = md;       tt = top;     }     return top;   }   bool mark[N] = {0};   void dfsp(int v) {     mark[v] = 1;     for (int i = 0; i < n; i++) {       if (ad[v][i] && mark[i] == 0) dfsp(i);     }   }   const int M = 1e9 + 7;   int main() {     ios::sync_with_stdio(false);     cin.tie(0);     cout.tie(0);     cin >> n;     if (n == 2) {       cout << 0 << endl << 2;       return 0;     }     for (int i = 0; i < n; i++) cin >> t[i].first >> t[i].second;     cout << bs() << endl;     connect(tt);     long long x = 1;     for (int i = 0; i < n; i++) {       if (mark[i] == 0) {         x *= 2;         x %= M;         dfsp(i);       }     }     cout << x << endl;     return 0;   }   