#include <bits/stdc++.h>
using namespace std;
const int p = 1000000007;
struct arr {
  int x, y;
} a[10002];
int n, l = 210000000, r = -210000000, u = -210000000, d = 210000000, ans1, ans2,
       x, y, re1, re2;
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d %d", &x, &y);
    a[i].x = x + y;
    a[i].y = x - y;
    l = min(l, a[i].x);
    r = max(r, a[i].x);
    d = min(d, a[i].y);
    u = max(u, a[i].y);
  }
  for (int i = 1; i <= n; i++)
    ans1 = max(ans1,
               min(max(a[i].x - l, a[i].y - d), max(r - a[i].x, u - a[i].y)));
  for (int i = 1; i <= n; i++)
    ans2 = max(ans2,
               min(max(a[i].x - l, u - a[i].y), max(r - a[i].x, a[i].y - d)));
  re1 = min(ans1, ans2);
  re2 = 2;
  for (int i = 1; i <= n; i++)
    if (max(max(a[i].x - l, a[i].y - d), max(r - a[i].x, u - a[i].y)) <= re1)
      re2 = re2 * 2 % p;
  if (ans1 == ans2 && r - l > re1 && u - d > re1) re2 = re2 * 2 % p;
  printf("%d\n%d", re1, re2);
  return 0;
}
