#include <bits/stdc++.h>
using namespace std;
const int N = 5005;
int n, l = 0, r = 10000, mid, x[N], y[N], d[N][N], b[N];
bool dfs(int i, int k) {
  if (b[i] >= 0) return b[i] - k;
  b[i] = k;
  for (int j = 1; j <= n; j++)
    if (d[i][j] > mid)
      if (dfs(j, k ^ 1)) return 1;
  return 0;
}
int cal() {
  int res = 1;
  memset(b, -1, sizeof(b));
  for (int i = 1; i <= n; i++)
    if (b[i] < 0) {
      if (dfs(i, 0)) return -1;
      res = res * 2 % 1000000007;
    }
  return res;
}
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> x[i] >> y[i];
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= n; j++) d[i][j] = abs(x[i] - x[j]) + abs(y[i] - y[j]);
  while (l <= r) {
    mid = (l + r) / 2;
    if (cal() < 0)
      l = mid + 1;
    else
      r = mid - 1;
  }
  mid = l;
  cout << l << endl << cal() << endl;
  return 0;
}
