#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
int n, x[5011], y[5011], a(1e5), b(a), c(-a), d(c), s(2), f, g, h;
int main() {
  ios::sync_with_stdio(false);
  cin >> n;
  for (int i = 1, X, Y; i <= n; ++i) {
    cin >> 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 = 1, X, Y; X = x[i], Y = y[i], i <= n; ++i) {
    f = max(f, min(max(X - a, Y - b), max(c - X, d - Y)));
    g = max(g, min(max(X - a, d - Y), max(c - X, Y - b)));
  }
  h = min(f, g);
  cout << h << endl;
  for (int i = 1, X, Y; X = x[i], Y = y[i], i <= n; ++i)
    (s <<= max(max(X - a, Y - b), max(c - X, d - Y)) <= h) %= MOD;
  (s <<= f == g && a + h < c && b + h < d) %= MOD;
  cout << s << endl;
  return 0;
}
