#include <bits/stdc++.h>
using namespace std;
int n, x[5005], y[5005], dist[5005][5005], vis[5005];
bool dfs(int c, int mid, int col) {
  if (vis[c] != -1) return col == vis[c];
  vis[c] = col;
  for (int i = 0; i < n; i++) {
    if (i != c && mid < dist[c][i] && !dfs(i, mid, 1 - col)) return false;
  }
  return true;
}
bool cor(int mid) {
  memset(vis, -1, sizeof(vis));
  for (int i = 0; i < n; i++) {
    if (vis[i] == -1) {
      if (!dfs(i, mid, 0)) return false;
    }
  }
  return true;
}
int main() {
  ios::sync_with_stdio(false);
  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++) {
      dist[i][j] = ((x[i] - x[j]) > 0 ? (x[i] - x[j]) : -(x[i] - x[j])) +
                   ((y[i] - y[j]) > 0 ? (y[i] - y[j]) : -(y[i] - y[j]));
    }
  }
  int lb = -1, ub = 10001, cnt = 0, res = 1;
  while (ub - lb > 1) {
    int mid = (lb + ub) / 2;
    if (cor(mid))
      ub = mid;
    else
      lb = mid;
  }
  memset(vis, -1, sizeof(vis));
  for (int i = 0; i < n; i++) {
    if (vis[i] == -1) {
      dfs(i, ub, 0);
      cnt++;
    }
  }
  for (int i = 0; i < cnt; i++) {
    res = (res << 1) % 1000000007;
  }
  cout << ub << '\n' << res << '\n';
  return 0;
}
