#include <bits/stdc++.h>
using namespace std;
int c[5001], d[5001][5001], n, x[5001], y[5001], mid, ans, i, j;
bool dfs(int x, int col) {
  c[x] = col;
  for (int i = 1; i <= n; i++) {
    if (d[x][i] <= mid || i == x) continue;
    if (c[i] == -1 && !dfs(i, col ^ 1)) return false;
    if (c[i] >= 0 && c[i] == col) return false;
  }
  return true;
}
int Calc() {
  memset(c, -1, sizeof(c));
  int r = 1;
  for (int i = 1; i <= n; i++)
    if (c[i] < 0) {
      if (!dfs(i, 0)) return -1;
      r = r * 2;
      if (r > 1000000007) r -= 1000000007;
    }
  return r;
}
int dis(int i, int j) { return abs(x[i] - x[j]) + abs(y[i] - y[j]); }
int main() {
  scanf("%d", &n);
  for (i = 1; i <= n; i++) scanf("%d%d", &x[i], &y[i]);
  for (i = 1; i <= n; i++)
    for (j = i + 1; j <= n; j++) d[i][j] = d[j][i] = dis(i, j);
  int l = 0, r = 10000;
  while (l <= r) {
    mid = (l + r) >> 1;
    if (Calc() == -1)
      l = mid + 1;
    else
      ans = mid, r = mid - 1;
  }
  mid = ans;
  printf("%d\n%d\n", ans, Calc());
  return 0;
}
