#include <bits/stdc++.h>
const int N = 5010;
bool bip, vis[N];
int m[N * N], n, W, col[N], Cnt = 1, sz = 0, mod = 1e9 + 7, x[N], y[N];
;
using namespace std;
void dfs(int v, int C) {
  if (bip == false) return;
  vis[v] = true;
  col[v] = C;
  for (int i = 0; i < n; i++) {
    if (i == v) continue;
    if (abs(x[v] - x[i]) + abs(y[i] - y[v]) <= W) continue;
    if (vis[i] && i != v) {
      if (col[i] == C) {
        bip = false;
        return;
      }
      continue;
    }
    if (abs(x[v] - x[i]) + abs(y[i] - y[v]) > W) {
      dfs(i, 3 - C);
    }
  }
}
bool check(int j) {
  W = m[j];
  bip = true;
  Cnt = 1;
  for (int i = 0; i < n; i++) {
    vis[i] = false;
    col[i] = 0;
  }
  for (int i = 0; i < n; i++) {
    if (!vis[i]) {
      dfs(i, 1);
      Cnt *= 2;
      Cnt %= mod;
      if (bip == false) return false;
    }
  }
  return true;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  for (int i = 0; i < n; i++) cin >> x[i] >> y[i];
  int c = 2;
  m[0] = -1;
  m[1] = 0;
  for (int i = 0; i < n; i++) {
    for (int j = i + 1; j < n; j++) {
      if (i == j) continue;
      m[c++] = abs(x[i] - x[j]) + abs(y[i] - y[j]);
    }
  }
  m[c] = 1e9;
  sort(m, m + n * (n - 1) / 2 + 3);
  int lo = 0, hi = c;
  while (hi - lo > 1) {
    int mid = (hi + lo) / 2;
    if (check(mid))
      hi = mid;
    else
      lo = mid;
  }
  cout << m[hi] << '\n';
  check(hi);
  cout << (Cnt) % mod << '\n';
}
