#include <bits/stdc++.h>
using namespace std;
const long long inf = 1e12;
const long long mod = 1e9 + 7;
const long long M = 300 + 10;
const long long N = 50 * 100 + 10;
int x[N], y[N], color[N], n, mid, k, low = -1, high = 2e4 + 10, cnt, ans;
void dfs(int v) {
  int i;
  for (i = 0; i < n; i++) {
    int w = abs(x[i] - x[v]) + abs(y[i] - y[v]);
    if (w > mid) {
      if (color[i] == color[v])
        k = 0;
      else if (!color[i]) {
        color[i] = 3 - color[v];
        dfs(i);
      }
    }
  }
  return;
}
void faster() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
}
int main() {
  faster();
  cin >> n;
  for (int i = 0; i < n; i++) cin >> x[i] >> y[i];
  while (high - low > 1) {
    mid = (low + high) / 2;
    k = 1;
    for (int i = 0; i < n; i++) color[i] = 0;
    for (int i = 0; i < n; i++) {
      if (!color[i]) {
        k *= 2;
        if (k >= mod) k -= mod;
        color[i] = 1;
        dfs(i);
      }
    }
    if (k) {
      cnt = k;
      high = mid;
      ans = mid;
    } else
      low = mid;
  }
  cout << ans << endl << cnt << endl;
  return 0;
}
