#include <bits/stdc++.h>
using namespace std;
vector<int> e[5005];
int col[5005];
bool flag;
bool dfs(int u, int fa, int p) {
  col[u] = p;
  for (int i = 0; i < e[u].size(); ++i) {
    int v = e[u][i];
    if (v == fa) continue;
    if (col[v] == col[u]) return 1;
    if (col[v] == -1)
      if (dfs(v, u, p ^ 1)) return 1;
  }
  return 0;
}
int n, dis[5005][5005];
bool check(int x) {
  for (int i = 1; i <= n; ++i) {
    e[i].clear();
    col[i] = -1;
  }
  flag = 0;
  for (int i = 1; i <= n; ++i)
    for (int j = 1; j <= n; ++j)
      if (dis[i][j] > x) e[i].push_back(j);
  for (int i = 1; i <= n; ++i)
    if (col[i] == -1)
      if (dfs(i, 0, 1)) return 0;
  return 1;
}
int cnt;
void dfs2(int u) {
  col[u] = 1;
  for (int i = 0; i < e[u].size(); ++i)
    if (!col[e[u][i]]) dfs2(e[u][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 ans, x[5005], y[5005], maxdis = -1;
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]);
      maxdis = max(maxdis, dis[i][j]);
    }
  int l = 0, r = maxdis;
  while (l <= r) {
    int mid = l + r >> 1;
    if (check(mid)) {
      ans = mid;
      r = mid - 1;
    } else
      l = mid + 1;
  }
  printf("%d\n", ans);
  for (int i = 1; i <= n; ++i) {
    e[i].clear();
    col[i] = 0;
  }
  for (int i = 1; i <= n; ++i)
    for (int j = 1; j <= n; ++j)
      if (dis[i][j] > ans) e[i].push_back(j);
  for (int i = 1; i <= n; ++i)
    if (!col[i]) {
      ++cnt;
      dfs2(i);
    }
  printf("%lld", qpow(1ll * 2, 1ll * cnt));
  return 0;
}
