#include <bits/stdc++.h>
using namespace std;
const int maxn = 5005;
const int mod = 1000000007;
int dis[maxn][maxn];
bool vis[maxn];
int x[maxn], y[maxn], col[maxn];
int n, l, r, mid, ans, cnt;
long long ans2;
void dfs(int x, int d) {
  if (cnt == 0) return;
  if (vis[x]) {
    if (col[x] != d) cnt = 0;
    return;
  }
  vis[x] = true;
  col[x] = d;
  for (int(i) = 1; (i) <= n; i++) {
    if (x == i) continue;
    if (dis[x][i] > mid) dfs(i, -d);
  }
}
long long _get(int x) {
  if (x == 0) return 1;
  if (x == 1) return 2;
  if (x & 1) return _get(x - 1) * 2 % mod;
  return (_get(x / 2) % mod * +_get(x / 2) % mod) % mod;
}
void solve(int l, int r) {
  mid = (l + r) / 2;
  cnt = 0;
  memset(vis, false, sizeof(vis));
  for (int(i) = 1; (i) <= n; i++)
    if (!vis[i]) {
      cnt++;
      dfs(i, 1);
      if (!cnt) break;
    }
  if (l == r) {
    ans = l;
    ans2 = _get(cnt);
    return;
  }
  if (cnt)
    solve(l, mid);
  else
    solve(mid + 1, r);
}
int main() {
  cin >> n;
  for (int(i) = 1; (i) <= n; i++) cin >> x[i] >> y[i];
  for (int(i) = 1; (i) <= n; i++)
    for (int j = i + 1; j <= n; j++)
      dis[i][j] = dis[j][i] = abs(x[i] - x[j]) + abs(y[i] - y[j]);
  solve(0, 10000);
  cout << ans << endl << ans2;
  return 0;
}
