#include <bits/stdc++.h>
using namespace std;
const int iinf = 1 << 29;
const long long inf = 1ll << 60;
const long long mod = 1e9 + 7;
void GG() {
  cout << "-1\n";
  exit(0);
}
long long mpow(long long a, long long n, long long mo = mod) {
  long long re = 1;
  while (n > 0) {
    if (n & 1) re = re * a % mo;
    a = a * a % mo;
    n >>= 1;
  }
  return re;
}
long long inv(long long b, long long mo = mod) {
  if (b == 1) return b;
  return (mo - mo / b) * inv(mo % b) % mo;
}
const int maxn = 5005;
int col[maxn];
int x[maxn], y[maxn];
int d[maxn][maxn];
int n, M;
bool dfs(int v) {
  for (int u = 0; u < n; ++u) {
    if (d[v][u] > M) {
      if (col[u] == -1) {
        col[u] = col[v] ^ 1;
        if (!dfs(u)) return 0;
      } else {
        if (col[u] != col[v] ^ 1) {
          return 0;
        }
      }
    }
  }
  return 1;
}
signed main() {
  ios_base::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 = 0; j < n; ++j) {
      d[i][j] = abs(x[i] - x[j]) + abs(y[i] - y[j]);
    }
  }
  int l = 0, r = 100002;
  int nof = 0;
  while (l != r) {
    memset(col, -1, sizeof col);
    M = l + r >> 1;
    bool B = 1;
    for (int i = 0; i < n; i++) {
      if (col[i] == -1) {
        col[i] = 0;
        if (!dfs(i)) {
          B = 0;
          break;
        }
      }
    }
    if (!B) {
      l = M + 1;
    } else {
      r = M;
    }
  }
  cout << l << '\n';
  memset(col, -1, sizeof col);
  M = l;
  for (int i = 0; i < n; i++) {
    if (col[i] == -1) {
      col[i] = 0;
      nof++;
      dfs(i);
    }
  }
  cout << mpow(2, nof) << '\n';
}
