#include <bits/stdc++.h>
using namespace std;
const int mm = 5e3 + 50;
int n;
pair<int, int> g[mm];
int color[mm];
const long long mol = 1000000007;
void input() {
  cin >> n;
  int a1, a2;
  for (int i = 0; i < n; i++) {
    cin >> a1 >> a2;
    g[i].first = a1;
    g[i].second = a2;
  }
}
long long dist(int u, int v) {
  return abs(g[u].first - g[v].first) + abs(g[u].second - g[v].second);
}
bool dfs(int size, int u, bool y) {
  color[u] = y + 1;
  for (int i = 0; i < n; i++) {
    if (dist(u, i) != 0 && dist(u, i) >= size && color[i] == 0) {
      if (!dfs(size, i, !y)) return 0;
    } else if (dist(u, i) != 0 && dist(u, i) >= size && color[i] == color[u])
      return 0;
  }
  return 1;
}
long long dfs_runner(int size) {
  memset(color, 0, sizeof(color));
  long long out = 1;
  for (int i = 0; i < n; i++) {
    if (color[i] == 0) {
      if (dfs(size, i, 1))
        out = (out * 2) % mol;
      else
        out = 0;
    }
    if (!out) break;
  }
  return out;
}
int search() {
  int l = 0;
  int r = 1e4;
  while (abs(l - r) > 1) {
    int mid = (l + r) / 2;
    if (dfs_runner(mid))
      r = mid;
    else
      l = mid;
  }
  return r;
}
void solve() {
  int k = search();
  cout << k - 1 << endl << dfs_runner(k) << endl;
}
int main() {
  input();
  solve();
}
