#include <bits/stdc++.h>
using namespace std;
int col[5001], mid, n, dis[5001][5001], ans;
bool v[5001];
long long mod = 1e9 + 7;
bool dfs(int x) {
  v[x] = 1;
  for (int i = 1; i <= n; ++i)
    if (i != x && dis[x][i] > mid)
      if (!v[i]) {
        col[i] = col[x] ^ 1;
        if (dfs(i)) return 1;
      } else if (col[x] == col[i])
        return 1;
  return 0;
}
bool check() {
  memset(v, 0, sizeof(v));
  for (int i = 1; i <= n; ++i)
    if (!v[i])
      if (dfs(i)) return 0;
  return 1;
}
void dfss(int x) {
  v[x] = 1;
  for (int i = 1; i <= n; ++i)
    if (!v[i] && dis[x][i] > ans) dfss(i);
}
long long mult(long long x, long long y) {
  long long res = x * 1ll;
  y--;
  while (y) {
    if (y & 1) res = res * x % mod;
    x = x * x % mod;
    y >>= 1;
  }
  return res;
}
int cnt, x[5001], y[5001];
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) scanf("%d%d", &x[i], &y[i]);
  for (int i = 1; i <= n; ++i)
    for (int j = 1; j <= n; ++j)
      dis[i][j] = abs(x[i] - x[j]) + abs(y[i] - y[j]);
  int l = 0, r = 10000;
  while (l <= r) {
    mid = l + r >> 1;
    if (check()) {
      ans = mid;
      r = mid - 1;
    } else
      l = mid + 1;
  }
  memset(v, 0, sizeof(v));
  printf("%d\n", ans);
  for (int i = 1; i <= n; ++i)
    if (!v[i]) {
      ++cnt;
      dfss(i);
    }
  printf("%I64d", mult(2ll, (long long)cnt));
  return 0;
}
