#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-10;
const int oo = ~0u >> 2, mo = (int)1e9 + 7;
const int mn = 5100, md = 5100;
pair<int, int> Ans;
int X[mn], Y[mn], e[mn];
int n;
void init(int *a) {
  a[0] = oo;
  for (int i = 1; i <= n; ++i) (a[0] = min(a[0], a[i]));
  for (int i = 1; i <= n; ++i) a[i] -= a[0];
  a[0] = -oo;
  for (int i = 1; i <= n; ++i) (a[0] = max(a[0], a[i]));
}
bool chk(pair<int, int> t, int x) { return t.first <= x && x <= t.second; }
bool chk(int m) {
  pair<int, int> a(0, m), b(X[0] - m, X[0]), c(0, m), d(Y[0] - m, Y[0]);
  int ret = 0;
  for (int p = 0; p <= 1; ++p)
    if (!p || m < X[0]) {
      for (int q = 0; q <= 1; ++q)
        if (!q || m < Y[0]) {
          vector<int> T = vector<int>(3, 0);
          for (int i = 1; i <= n; ++i) {
            bool l = chk(a, X[i]) && chk(c, Y[i]);
            bool r = chk(b, X[i]) && chk(d, Y[i]);
            if (l && r)
              ++T[0];
            else if (l)
              ++T[1];
            else if (r)
              ++T[2];
            else
              break;
          }
          if (T[0] + T[1] + T[2] == n)
            ret = (((long long)(ret) + (e[T[0]])) % mo);
          swap(c, d);
        }
      swap(a, b);
    }
  if (ret) Ans = make_pair(m, ret);
  return ret;
}
int main() {
  scanf("%d", &n);
  e[0] = 1;
  for (int i = 1; i <= n; ++i) {
    int x, y;
    scanf("%d%d", &x, &y);
    X[i] = x + y, Y[i] = x - y, e[i] = ((long long)(e[i - 1]) * (2) % mo);
  }
  init(X);
  init(Y);
  int l = 0, r = max(X[0], Y[0]);
  while (l <= r) {
    int m = (l + r) / 2;
    if (chk(m))
      r = m - 1;
    else
      l = m + 1;
  }
  printf("%d\n%d\n", Ans.first, Ans.second);
}
