#include <bits/stdc++.h>
const int oo = 1000000007;
int i, j, N, l, r, mid;
int b[5005], X[5005], Y[5005], f[5005];
int d[5005][5005];
int Abs(int a) {
  if (a < 0) return -a;
  return a;
}
bool Check(int i, int p) {
  int j;
  f[i] = p;
  for (j = 1; j <= N; ++j)
    if (d[i][j] > mid)
      if (f[j] == -1) {
        if (!Check(j, p ^ 1)) return 0;
      } else {
        if (f[j] == p) return 0;
      }
  return 1;
}
int Work() {
  int i, res = 0;
  for (i = 1; i <= N; ++i) f[i] = -1;
  for (i = 1; i <= N; ++i)
    if (f[i] == -1) {
      if (!Check(i, 0)) return -1;
      ++res;
    }
  return b[res];
}
int main() {
  scanf("%d", &N);
  for (i = 1; i <= N; ++i) scanf("%d%d", &X[i], &Y[i]);
  b[0] = 1;
  for (i = 1; i <= N; ++i) b[i] = b[i - 1] * 2 % oo;
  for (i = 1; i <= N; ++i)
    for (j = i + 1; j <= N; ++j)
      d[i][j] = d[j][i] = Abs(X[i] - X[j]) + Abs(Y[i] - Y[j]);
  for (l = 0, r = 10000; l < r;) {
    mid = (l + r) / 2;
    if (Work() > 0)
      r = mid;
    else
      l = mid + 1;
  }
  mid = (l + r) / 2;
  printf("%d\n%d\n", mid, Work());
  return 0;
}
