#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 5000 + 10;
const int P = 1e9 + 7;
int n, x[MAX_N], y[MAX_N];
int mark[MAX_N];
int dis(int i, int j) { return abs(x[i] - x[j]) + abs(y[i] - y[j]); }
bool dfs(int u, int w) {
  bool ok = true;
  for (int i = 0; i < n; i++) {
    if (mark[i] == 0 && dis(i, u) > w)
      mark[i] = 3 - mark[u], ok &= dfs(i, w);
    else if (mark[i] == mark[u] && dis(i, u) > w)
      ok = false;
  }
  return ok;
}
void dfs1(int u, int w) {
  mark[u] = 1;
  for (int i = 0; i < n; i++)
    if (mark[i] == 0 && dis(i, u) > w) dfs1(i, w);
}
bool check(int w) {
  bool ok = true;
  memset(mark, 0, sizeof mark);
  for (int i = 0; i < n; i++)
    if (mark[i] == 0) mark[i] = 1, ok &= dfs(i, w);
  return ok;
}
int main() {
  ios_base ::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  cin >> n;
  for (int i = 0; i < n; i++) cin >> x[i] >> y[i];
  int L = -1, R = 2 * MAX_N;
  while (L + 1 < R) {
    int m = (L + R) / 2;
    check(m) ? R = m : L = m;
  }
  int ans = 1;
  cout << R << endl;
  memset(mark, 0, sizeof mark);
  for (int i = 0; i < n; i++)
    if (mark[i] == 0) dfs1(i, R), ans *= 2, ans %= P;
  cout << ans << endl;
  return 0;
}
