#include <bits/stdc++.h>
#pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,fast-math")
#pragma GCC target( \
    "sse,sse2,sse3,ssse3,sse4.1,sse4.2,avx,avx2,popcnt,tune=native")
using namespace std;
namespace t {
template <typename T>
inline const T gcd(T __m, T __n) {
  while (__n != 0) {
    T __t = __m % __n;
    __m = __n;
    __n = __t;
  }
  return __m;
}
template <typename T>
inline const T max(const T &a, const T &b) {
  return a > b ? a : b;
}
template <typename T>
inline const T min(const T &a, const T &b) {
  return a < b ? a : b;
}
template <typename T>
inline const T abs(const T &a) {
  return a > 0 ? a : -a;
}
template <typename T>
inline void in(T &x) {
  register T res = 0;
  register int neg = 1;
  char c = getchar();
  for (; !isdigit(c); c = getchar()) {
    if (c == '-') {
      neg = -1;
    }
  }
  for (; isdigit(c); c = getchar()) {
    res = res * 10 + c - '0';
  }
  x = res * neg;
}
inline int read() {
  register int res = 0, neg = 1;
  char c = getchar();
  for (; !isdigit(c); c = getchar()) {
    if (c == '-') {
      neg = -1;
    }
  }
  for (; isdigit(c); c = getchar()) {
    res = res * 10 + c - '0';
  }
  return res * neg;
}
}  // namespace t
const int mod = 1e9 + 7;
int N, x[5005], y[5005], L = 1e9, R = -1e9, D = 1e9, U = -1e9;
int main() {
  t::in(N);
  for (int i = 1, X, Y; i <= N; i++) {
    t::in(X);
    t::in(Y);
    x[i] = X - Y;
    y[i] = X + Y;
    L = t::min(L, x[i]);
    R = t::max(R, x[i]);
    D = t::min(D, y[i]);
    U = t::max(U, y[i]);
  }
  int a = 0, b = 0, c, ans = 2;
  for (int i = 1; i <= N; i++) {
    a = t::max(a,
               t::min(t::max(x[i] - L, y[i] - D), t::max(R - x[i], U - y[i])));
    b = t::max(b,
               t::min(t::max(x[i] - L, U - y[i]), t::max(R - x[i], y[i] - D)));
  }
  c = t::min(a, b);
  for (int i = 1; i <= N; i++) {
    if (t::max(t::max(x[i] - L, R - x[i]), t::max(y[i] - D, U - y[i])) <= c) {
      (ans <<= 1) %= mod;
    }
  }
  if (a == b && L + c < R && D + c < U) {
    (ans <<= 1) %= mod;
  }
  printf("%d\n%d\n", c, ans);
}
