#include <bits/stdc++.h>
using namespace std;
const int p = 1e9 + 7;
int n, a, b, f, g, c, d, h, X, Y, s, x[10100], y[10100];
int main() {
  scanf("%d", &n);
  a = b = 100000;
  c = d = -100000;
  for (int i = 0; i < n; i++)
    scanf("%d%d", &X, &Y), x[i] = X - Y, y[i] = X + Y, a = min(a, x[i]),
                           c = max(c, x[i]), b = min(b, y[i]), d = max(d, y[i]);
  for (int i = 0; i < n; i++)
    f = max(f, min(max(x[i] - a, y[i] - b), max(c - x[i], d - y[i]))),
    g = max(g, min(max(x[i] - a, d - y[i]), max(c - x[i], y[i] - b)));
  h = min(f, g), s = 2;
  for (int i = 0; i < n; i++)
    if (max(max(x[i] - a, y[i] - b), max(c - x[i], d - y[i])) <= h)
      s = s * 2 % p;
  if (f == g && a + h < c && b + h < d) s = s * 2 % p;
  printf("%d\n%d", h, s);
}
