#include <bits/stdc++.h>
using namespace std;
const int P = 1e9 + 7;
const int maxn = 5100;
int n, m;
struct Tpnt {
  int x, y;
  inline int dist(const Tpnt &b) { return abs(x - b.x) + abs(y - b.y); }
} A[maxn];
namespace Ninit {
void init() {
  int i, j;
  scanf("%d", &n);
  for (i = 0; i < n; ++i) scanf("%d%d", &A[i].x, &A[i].y);
}
}  // namespace Ninit
namespace Nsolve {
int tot, val;
namespace Ncheck {
int value, C[maxn];
bool dfs(int x, int c = 1) {
  int i;
  C[x] = c;
  for (i = 0; i < n; ++i)
    if (A[x].dist(A[i]) > value) {
      if (!C[i] && !dfs(i, 3 - c)) return false;
      if (C[i] == c) return false;
    }
  return true;
}
int Chk(int _x) {
  int i, Fc = 0;
  value = _x, memset(C, 0, sizeof C);
  for (i = 0; i < n; ++i)
    if (!C[i]) {
      ++Fc;
      if (!dfs(i)) return 0;
    }
  return Fc;
}
}  // namespace Ncheck
using Ncheck::Chk;
void solve() {
  int l, r, mid, i, ret, k;
  for (l = -1, r = 10000; l + 1 < r; Chk(mid) ? r = mid : l = mid)
    mid = l + r >> 1;
  printf("%d\n", r);
  for (k = Chk(r), ret = 1, i = 0; i < k; ++i) ret = ret * 2 % P;
  printf("%d\n", ret);
}
}  // namespace Nsolve
int main() {
  Ninit::init();
  Nsolve::solve();
  return 0;
}
