#include <bits/stdc++.h>
using namespace std;
const int MAXN = 5050;
const int MOD = 1000000007;
int n, threshold;
short x[MAXN], y[MAXN], dist[MAXN][MAXN];
int mark[MAXN];
bool dfs(int pos, int color = 0) {
  if (mark[pos] != -1) return mark[pos] == color;
  mark[pos] = color;
  for (register int i = (0); i < (int)(n); ++i)
    if (dist[pos][i] > threshold && !dfs(i, color ^ 1)) return false;
  return true;
}
int count_ways() {
  memset(mark, -1, sizeof mark);
  int res = 1;
  for (register int i = (0); i < (int)(n); ++i)
    if (mark[i] == -1) {
      if (!dfs(i)) return -1;
      res = res * 2 % MOD;
    }
  return res;
}
int main() {
  ios::sync_with_stdio(false);
  cin >> n;
  for (register int i = (0); i < (int)(n); ++i) {
    cin >> x[i] >> y[i];
    for (register int j = (0); j < (int)(i + 1); ++j)
      dist[i][j] = dist[j][i] = abs(x[i] - x[j]) + abs(y[i] - y[j]);
  }
  int lo = 0, hi = 10000;
  while (lo < hi) {
    threshold = (lo + hi) / 2;
    if (count_ways() == -1)
      lo = threshold + 1;
    else
      hi = threshold;
  }
  threshold = lo;
  cout << threshold << endl;
  cout << count_ways() << endl;
  return 0;
}
