#include <bits/stdc++.h>
using namespace std;
const int maxn = 5010;
const int mo = 1000000007;
int n, col[maxn], x[maxn], y[maxn], dist[maxn][maxn], cnt, lim;
bool dfs(int now, int c) {
  col[now] = c;
  for (int a = 1; a <= n; a++)
    if (dist[now][a] > lim) {
      if (col[a] == col[now]) return false;
      if (col[a] == 0 && !dfs(a, 3 - c)) return false;
    }
  return true;
}
bool check(int v) {
  memset(col, 0, sizeof(col));
  cnt = 0;
  lim = v;
  for (int a = 1; a <= n; a++)
    if (!col[a]) {
      cnt++;
      if (!dfs(a, 1)) return false;
    }
  return true;
}
int main() {
  scanf("%d", &n);
  for (int a = 1; a <= n; a++) scanf("%d%d", &x[a], &y[a]);
  for (int a = 1; a <= n; a++)
    for (int b = 1; b <= n; b++)
      dist[a][b] = abs(x[a] - x[b]) + abs(y[a] - y[b]);
  int l = -1, r = 10000;
  while (l + 1 != r) {
    int m = (l + r) >> 1;
    if (check(m))
      r = m;
    else
      l = m;
  }
  check(r);
  int ans = 1;
  for (int a = 1; a <= cnt; a++) ans = ans * 2 % mo;
  printf("%d\n%d\n", r, ans);
  return 0;
}
