#include <bits/stdc++.h>
using namespace std;
const int maxn = 5010;
const int md = 1e9 + 7;
int n;
int x[maxn], y[maxn];
int xmn, xmx, ymn, ymx;
int main() {
  scanf("%d", &n);
  xmn = ymn = int(2e9);
  xmx = ymx = int(-2e9);
  for (int xx, yy, i = 1; i <= n; ++i) {
    scanf("%d%d", &xx, &yy);
    x[i] = xx - yy;
    y[i] = xx + yy;
    xmn = min(xmn, x[i]);
    ymn = min(ymn, y[i]);
    xmx = max(xmx, x[i]);
    ymx = max(ymx, y[i]);
  }
  int f, g;
  f = g = 0;
  for (int i = 1; i <= n; ++i) {
    f = max(f, min(max(x[i] - xmn, y[i] - ymn), max(xmx - x[i], ymx - y[i])));
    g = max(g, min(max(x[i] - xmn, ymx - y[i]), max(xmx - x[i], y[i] - ymn)));
  }
  int ans = 2, h = min(g, f);
  for (int i = 1; i <= n; ++i) {
    if (max(max(x[i] - xmn, y[i] - ymn), max(xmx - x[i], ymx - y[i])) <= h)
      ans = (ans * 2) % md;
  }
  if (f == g && xmn + h < xmx && ymn + h < ymx) ans = (ans * 2) % md;
  printf("%d\n%d", h, ans);
  return 0;
}
