#include <bits/stdc++.h>
using namespace std;
int n, d[5005][5005], u[5005], le, ri, mid, f, cnt, ans;
pair<int, int> a[5005];
int abs(int t) { return (t >= 0 ? t : -t); }
void isbigra(int t, int c) {
  int i, j;
  u[t] = c;
  for (i = 1; i <= n; i = i + 1) {
    if (d[t][i] > mid) {
      if (u[i] == c) {
        f = 0;
        return;
      }
      if (!u[i]) isbigra(i, 3 - c);
    }
    if (!f) return;
  }
}
int solve() {
  int i, j;
  memset(u, 0, sizeof(u));
  cnt = 0;
  for (i = 1; i <= n; i = i + 1) {
    if (!u[i]) {
      cnt = cnt + 1;
      f = 1;
      isbigra(i, 1);
      if (!f) return 0;
    }
  }
  return 1;
}
int main() {
  int i, j;
  cin >> n;
  for (i = 1; i <= n; i = i + 1) {
    cin >> a[i].first >> a[i].second;
  }
  for (i = 1; i <= n; i = i + 1) {
    for (j = 1; j <= n; j = j + 1) {
      d[i][j] = abs(a[i].first - a[j].first) + abs(a[i].second - a[j].second);
      ri = max(ri, d[i][j]);
    }
  }
  while (le + 1 < ri) {
    mid = (le + ri) >> 1;
    if (solve())
      ri = mid;
    else
      le = mid;
  }
  mid = le;
  if (solve())
    ans = le;
  else
    ans = ri;
  cout << ans << endl;
  mid = ans;
  if (solve())
    ;
  ans = 1;
  while (cnt--) {
    ans = ans * 2 % 1000000007;
  }
  cout << ans << endl;
  return 0;
}
