#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
const int MAX = 5005;
int x[MAX], y[MAX], w[MAX][MAX], mark[MAX], n;
void dfs(int v, int len) {
  for (int u = 0; u < n; u++)
    if (w[v][u] > len) {
      if (mark[u] == mark[v]) throw 0;
      if (mark[u] != -1) continue;
      mark[u] = !mark[v];
      dfs(u, len);
    }
}
int solve(int len) {
  memset(mark, -1, sizeof(mark));
  int ans = 1;
  for (int v = 0; v < n; v++)
    if (mark[v] == -1) {
      try {
        mark[v] = 0;
        dfs(v, len);
      } catch (...) {
        return 0;
      }
      ans += ans;
      if (ans > MOD) ans -= MOD;
    }
  return ans;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> n;
  for (int i = 0; i < n; i++) cin >> x[i] >> y[i];
  for (int i = 0; i < n; i++)
    for (int j = i + 1; j < n; j++)
      w[i][j] = w[j][i] = abs(x[i] - x[j]) + abs(y[i] - y[j]);
  int left = 0, right = 10005;
  while (left < right) {
    int mid = (left + right) / 2;
    if (solve(mid))
      right = mid;
    else
      left = mid + 1;
  }
  cout << right << endl << solve(right);
  return 0;
}
