#include <bits/stdc++.h>
using namespace std;
const short maxn = 5000 + 5;
const int mod = 1000000000 + 7;
int n;
short x[maxn], y[maxn];
short d[maxn][maxn];
short md;
char col[maxn];
void dfs(int x) {
  for (int i = 0, _n = (int)(n); i < _n; i++)
    if (d[x][i] > md) {
      if (col[x] == col[i]) throw 0;
      if (col[i]) continue;
      col[i] = 3 - col[x];
      dfs(i);
    }
}
int cnt() {
  memset(col, 0, sizeof col);
  int r = 1;
  for (int i = 0, _n = (int)(n); i < _n; i++)
    if (col[i] == 0) {
      col[i] = 1;
      try {
        dfs(i);
      } catch (...) {
        return 0;
      }
      (r += r) >= mod ? r -= mod : 0;
    }
  return r;
}
int main() {
  ios::sync_with_stdio(false);
  cin >> n;
  for (int i = 0, _n = (int)(n); i < _n; i++) cin >> x[i] >> y[i];
  for (int i = 0, _n = (int)(n); i < _n; i++)
    for (int j = (int)(i + 1), _n = (int)(n); j < _n; j++)
      d[i][j] = d[j][i] = abs(x[i] - x[j]) + abs(y[i] - y[j]);
  short lo = -1, hi = 10000;
  while (lo + 1 < hi) {
    md = (lo + hi) / 2;
    if (cnt() != 0)
      hi = md;
    else
      lo = md;
  }
  md = hi;
  cout << hi << endl << cnt() << endl;
  {
    int _;
    cin >> _;
  }
}
