#include <bits/stdc++.h>
using namespace std;
int n, minx, maxx, miny, maxy, a[5010], b[5010];
int check(int s) {
  int ret = 1;
  for (int i = 1; i <= n; i++)
    if (((a[i] - minx <= s) && (b[i] - miny <= s) ||
         (maxx - a[i] <= s) && (maxy - b[i] <= s)) == 0) {
      ret = 0;
      break;
    }
  if (ret) return 1;
  ret = 1;
  for (int i = 1; i <= n; i++)
    if (((a[i] - minx <= s) && (maxy - b[i] <= s) ||
         (maxx - a[i] <= s) && (b[i] - miny <= s)) == 0) {
      ret = 0;
      break;
    }
  return ret;
}
long long calc(int s) {
  if ((maxx - minx <= s) && (maxy - miny <= s)) {
    long long ret = 1;
    for (int i = 1; i <= n; i++) ret = ret * 2 % 1000000007;
    return ret;
  }
  long long ret = 0;
  if (maxx - minx > s) {
    long long tmp = 1;
    for (int i = 1; i <= n; i++) {
      if (((a[i] - minx <= s) && (b[i] - miny <= s) ||
           (maxx - a[i] <= s) && (maxy - b[i] <= s)) == 0)
        tmp = 0;
      if ((a[i] - minx <= s) && (b[i] - miny <= s) && (maxx - a[i] <= s) &&
          (maxy - b[i] <= s))
        tmp = tmp * 2 % 1000000007;
    }
    ret += tmp;
  }
  if (maxy - miny > s) {
    long long tmp = 1;
    for (int i = 1; i <= n; i++) {
      if (((a[i] - minx <= s) && (maxy - b[i] <= s) ||
           (maxx - a[i] <= s) && (b[i] - miny <= s)) == 0)
        tmp = 0;
      if ((a[i] - minx <= s) && (maxy - b[i] <= s) && (maxx - a[i] <= s) &&
          (b[i] - miny <= s))
        tmp = tmp * 2 % 1000000007;
    }
    ret += tmp;
  }
  return ret * 2 % 1000000007;
}
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    int x, y;
    scanf("%d%d", &x, &y);
    a[i] = x - y;
    b[i] = x + y;
    if (i == 1) {
      minx = a[i];
      maxx = a[i];
      miny = b[i];
      maxy = b[i];
      continue;
    }
    minx = min(minx, a[i]);
    maxx = max(maxx, a[i]);
    miny = min(miny, b[i]);
    maxy = max(maxy, b[i]);
  }
  int lo = -1, hi = 10000;
  while (hi - lo > 1) {
    int mi = (lo + hi) / 2;
    if (check(mi))
      hi = mi;
    else
      lo = mi;
  }
  printf("%d\n", hi);
  printf("%I64d\n", calc(hi));
}
