#include <bits/stdc++.h>
using namespace std;
vector<pair<int, int> > f[10005];
const int bigp = 1000000007;
int fa[5005], ga[5005], x[5005], y[5005];
int N, tt, dst, bak, flag, xc, yc, ans;
int uu, xa, xd, yd;
int powc(int a, int b) {
  if (b == 0) return 1;
  int d = powc(a, b / 2);
  d = (long long)d * d % bigp;
  if (b % 2 == 1) d = (long long)d * a % bigp;
  return d;
}
bool merge(int xc, int yc) {
  if (fa[xc] == fa[yc]) {
    if (ga[xc] == ga[yc])
      return false;
    else
      return true;
  } else {
    --tt;
    int ss = fa[xc], tt = fa[yc];
    if (ga[xc] != ga[yc]) {
      for (int i = 1; i <= N; i++)
        if (fa[i] == ss) fa[i] = tt;
    } else {
      for (int i = 1; i <= N; i++)
        if (fa[i] == ss) fa[i] = tt, ga[i] = 1 - ga[i];
    }
  }
  return true;
}
int main() {
  scanf("%d", &N);
  for (int i = 1; i <= N; i++) scanf("%d %d", &x[i], &y[i]);
  for (int i = 1; i <= N; i++)
    for (int j = i + 1; j <= N; j++) {
      dst = abs(x[i] - x[j]) + abs(y[i] - y[j]);
      f[dst].push_back(make_pair(i, j));
    }
  for (int i = 1; i <= N; i++) fa[i] = i, ga[i] = 0;
  tt = N;
  for (int i = 9999; i >= 0; i--) {
    flag = 1;
    for (int j = 0; j < f[i + 1].size(); j++) {
      xc = f[i + 1][j].first, yc = f[i + 1][j].second;
      if (!merge(xc, yc)) {
        flag = 0;
        break;
      }
    }
    if (flag == 0) {
      ans = i + 1;
      break;
    }
    bak = tt;
  }
  cout << ans << endl;
  cout << powc(2, bak) << endl;
  return 0;
}
