#include <bits/stdc++.h>
using namespace std;
int col[5005], mid, n, dis[5005][5005];
bool vis[5005];
bool dfs(int u) {
  vis[u] = 1;
  for (int i = 1; i <= n; ++i)
    if (i != u && dis[u][i] > mid)
      if (!vis[i]) {
        col[i] = col[u] ^ 1;
        if (dfs(i)) return 1;
      } else if (col[u] == col[i])
        return 1;
  return 0;
}
bool check() {
  memset(vis, 0, sizeof(bool) * (n + 1));
  for (int i = 1; i <= n; ++i)
    if (!vis[i])
      if (dfs(i)) return 0;
  return 1;
}
int ans;
void dfs2(int u) {
  vis[u] = 1;
  for (int i = 1; i <= n; ++i) {
    if (!vis[i] && dis[u][i] > ans) dfs2(i);
  }
}
long long qpow(long long x, long long k) {
  long long res = x * 1ll;
  --k;
  while (k) {
    if (k & 1) res = res * x % 1000000007;
    x = x * x % 1000000007;
    k >>= 1;
  }
  return res;
}
int cnt, x[5005], y[5005];
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(vis, 0, sizeof(bool) * (n + 1));
  printf("%d\n", ans);
  for (int i = 1; i <= n; ++i)
    if (!vis[i]) {
      ++cnt;
      dfs2(i);
    }
  printf("%lld", qpow(1ll * 2, 1ll * cnt));
  return 0;
}
