#include <bits/stdc++.h>
int x[5000], y[5000], n, u[5000];
int dfs(int m, int d) {
  for (int i = 0; i < n; i++)
    if (abs(x[i] - x[m]) > d || abs(y[i] - y[m]) > d) {
      if (u[i] && u[i] == u[m]) return 0;
      if (!u[i] && (u[i] = -u[m], !dfs(i, d))) return 0;
    }
  return 1;
}
int dfs2(int d) {
  int ret = 0;
  for (int i = 0; i < n; i++) u[i] = 0;
  for (int i = 0; i < n; i++)
    if (!u[i]) ret++, u[i] = 1, dfs(i, d);
  return ret;
}
int main() {
  scanf("%d", &n);
  for (int i = 0, u, v; i < n; i++)
    scanf("%d%d", &u, &v), x[i] = u + v, y[i] = u - v;
  int minx = x[0], maxx = x[0];
  int miny = y[0], maxy = y[0];
  for (int i = 1; i < n; i++) {
    if (x[i] < minx) minx = x[i];
    if (x[i] > maxx) maxx = x[i];
    if (y[i] < miny) miny = y[i];
    if (y[i] > maxy) maxy = y[i];
  }
  int l = 0, r = 10000;
  for (; l < r;) {
    int mid = l + r >> 1;
    int flag = 1, flag2 = 1;
    for (int i = 0; i < n; i++)
      if ((x[i] - minx > mid || y[i] - miny > mid) &&
          (maxx - x[i] > mid || maxy - y[i] > mid))
        flag = 0;
    for (int i = 0; i < n; i++)
      if ((x[i] - minx > mid || maxy - y[i] > mid) &&
          (maxx - x[i] > mid || y[i] - miny > mid))
        flag2 = 0;
    if (!flag && !flag2)
      l = mid + 1;
    else
      r = mid;
  }
  printf("%d\n", l);
  int num = dfs2(l), ans = 1;
  for (int i = 0; i < num; i++) ans = ans * 2 % 1000000007;
  printf("%d\n", ans);
  return 0;
}
