#include <bits/stdc++.h>
using namespace std;
const int MAXN = 5150;
struct Point {
  int x, y;
} p[MAXN];
int n, x, y;
int top, bot, lef, rig;
int d;
int ans;
int typ;
int cnt;
void init() {
  scanf("%d", &n);
  top = rig = -1.1e9;
  lef = bot = 1.1e9;
  int x, y;
  for (int i = 0; i < n; ++i) {
    scanf("%d%d", &x, &y);
    p[i].x = x + y;
    p[i].y = x - y;
    top = ((top > p[i].y) ? top : p[i].y);
    bot = ((bot < p[i].y) ? bot : p[i].y);
    rig = ((rig > p[i].x) ? rig : p[i].x);
    lef = ((lef < p[i].x) ? lef : p[i].x);
  }
}
void solve() {
  int d = 0;
  for (int i = 0; i < n; ++i)
    d = max(d, min(max(p[i].x - lef, top - p[i].y),
                   max(rig - p[i].x, p[i].y - bot)));
  ans = d;
  typ = 1;
  d = 0;
  cnt = 0;
  if (top != bot) {
    for (int i = 0; i < n; ++i)
      d = max(d, min(max(p[i].x - lef, p[i].y - bot),
                     max(rig - p[i].x, top - p[i].y)));
    if (ans > d) {
      ans = d;
      typ = 2;
    } else if (ans == d) {
      typ = 3;
      cnt++;
    }
  }
  for (int i = 0; i < n; ++i) {
    if (typ & 1)
      cnt += max(max(p[i].x - lef, top - p[i].y),
                 max(rig - p[i].x, p[i].y - bot)) <= ans;
    if (typ & 2)
      cnt += max(max(p[i].x - lef, p[i].y - bot),
                 max(rig - p[i].x, top - p[i].y)) <= ans;
  }
  d = 1;
  for (int i = 0; i <= cnt; ++i) d = (d * 2) % 1000000007;
  printf("%d\n%d\n", ans, d);
}
int main() {
  init();
  solve();
  return 0;
}
