#include <bits/stdc++.h>
using namespace std;
int gi() {
  int w = 0;
  bool q = 1;
  char c = getchar();
  while ((c < '0' || c > '9') && c != '-') c = getchar();
  if (c == '-') q = 0, c = getchar();
  while (c >= '0' && c <= '9') w = w * 10 + c - '0', c = getchar();
  return q ? w : -w;
}
const int N = 1e4;
int x[N], y[N];
int main() {
  int n = gi(), i, lx = 1 << 30, rx = -1 << 30, ly = 1 << 30, ry = -1 << 30, a,
      b;
  int s1 = 0, s2 = 0, ans = 2, p, d = 0;
  for (i = 1; i <= n; i++) {
    a = gi(), b = gi();
    x[i] = a + b, y[i] = a - b;
    lx = min(lx, x[i]);
    rx = max(rx, x[i]);
    ly = min(ly, y[i]);
    ry = max(ry, y[i]);
  }
  for (i = 1; i <= n; i++) {
    s1 = max(s1, min(max(x[i] - lx, y[i] - ly), max(rx - x[i], ry - y[i])));
    s2 = max(s2, min(max(x[i] - lx, ry - y[i]), max(rx - x[i], y[i] - ly)));
  }
  printf("%d\n", p = min(s1, s2));
  for (i = 1; i <= n; i++)
    if (max(max(x[i] - lx, y[i] - ly), max(rx - x[i], ry - y[i])) <= p) d++;
  if (s1 == s2 && lx + p < rx && ly + p < ry) d++;
  while (d--) (ans <<= 1) %= 1000000007;
  printf("%d\n", ans);
  return 0;
}
