#include <bits/stdc++.h>
using namespace std;
vector<int> V[10001];
int n, x[5001], y[5001], h[5001], link[5001], a1, a2, tmp[51], gx, ans = 1,
                                                                   sv[10001];
int find(int x) {
  if (x != h[x]) h[x] = find(h[x]);
  return h[x];
}
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%d%d", &x[i], &y[i]);
  for (int i = 0; i < n; i++)
    for (int j = 0; j < n; j++)
      V[abs(x[i] - x[j]) + abs(y[i] - y[j])].push_back(10000 * i + j);
  for (int i = 0; i < n; i++) h[i] = i, link[i] = -1;
  for (int i = 10000; i >= 0; i--) {
    for (int j = 0; j < V[i].size(); j++) {
      a1 = V[i][j] / 10000;
      a2 = V[i][j] % 10000;
      h[a1] = find(h[a1]);
      h[a2] = find(h[a2]);
      if (link[h[a1]] == -1 && link[h[a2]] == -1)
        link[h[a1]] = h[a2], link[h[a2]] = h[a1];
      else if (link[h[a1]] == -1)
        link[h[a1]] = h[a2], h[a1] = find(link[h[a2]]);
      else if (link[h[a2]] == -1)
        link[h[a2]] = h[a1], h[a2] = find(link[h[a1]]);
      else {
        if (h[a1] == h[a2]) {
          tmp[0] = i;
          goto gg;
        } else {
          tmp[1] = h[a2];
          h[a2] = find(link[h[a1]]);
          h[link[tmp[1]]] = h[a1];
        }
      }
    }
  }
gg:;
  for (int i = 0; i < n; i++) h[i] = i, link[i] = -1;
  for (int i = 10000; i > tmp[0]; i--) {
    for (int j = 0; j < V[i].size(); j++) {
      a1 = V[i][j] / 10000;
      a2 = V[i][j] % 10000;
      h[a1] = find(h[a1]);
      h[a2] = find(h[a2]);
      if (link[h[a1]] == -1 && link[h[a2]] == -1)
        link[h[a1]] = h[a2], link[h[a2]] = h[a1];
      else if (link[h[a1]] == -1)
        link[h[a1]] = h[a2], h[a1] = find(link[h[a2]]);
      else if (link[h[a2]] == -1)
        link[h[a2]] = h[a1], h[a2] = find(link[h[a1]]);
      else {
        tmp[1] = h[a2];
        h[a2] = find(link[h[a1]]);
        h[link[tmp[1]]] = h[a1];
      }
    }
  }
  printf("%d\n", tmp[0]);
  for (int i = 0; i < n; i++) {
    h[i] = find(h[i]);
    if (link[h[i]] != -1) {
      if (sv[link[h[i]]] == 0) gx++, sv[link[h[i]]] = 1;
    } else
      ans *= 2, ans %= 1000000007;
  }
  for (int i = 0; i < gx / 2; i++) ans *= 2, ans %= 1000000007;
  printf("%d\n", ans);
  return 0;
}
