#include <bits/stdc++.h>
using namespace std;
int N, x[5005], y[5005], L = 1e9, R = -1e9, D = 1e9, U = -1e9;
int main() {
  scanf("%d", &N);
  for (int i = 1, X, Y; i <= N; i++)
    scanf("%d%d", &X, &Y), x[i] = X - Y, y[i] = X + Y, L = min(L, x[i]),
                           R = max(R, x[i]), D = min(D, y[i]), U = max(U, y[i]);
  int a = 0, b = 0, c, ans = 2;
  for (int i = 1; i <= N; i++)
    a = max(a, min(max(x[i] - L, y[i] - D), max(R - x[i], U - y[i]))),
    b = max(b, min(max(x[i] - L, U - y[i]), max(R - x[i], y[i] - D)));
  c = min(a, b);
  for (int i = 1; i <= N; i++)
    if (max(max(x[i] - L, R - x[i]), max(y[i] - D, U - y[i])) <= c)
      (ans <<= 1) %= 1000000007;
  if (a == b && L + c < R && D + c < U) (ans <<= 1) %= 1000000007;
  printf("%d\n%d\n", c, ans);
}
