#include <bits/stdc++.h>
template <class T>
inline void rd(T &x) {
  char c = getchar(), f = 0;
  x = 0;
  while (!isdigit(c)) f = (c == '-'), c = getchar();
  while (isdigit(c)) x = x * 10 + c - '0', c = getchar();
  x = f ? -x : x;
}
const int MAXN = 5e3 + 7;
const long long HA = 1e9 + 7;
long long fp(long long a, long long b) {
  long long r = 1;
  while (b) {
    if (b & 1) r = r * a % HA;
    b >>= 1, a = a * a % HA;
  }
  return r;
}
int n, x[MAXN], y[MAXN], dis[MAXN][MAXN], cc;
int col[MAXN];
std::vector<int> E[MAXN];
bool dfs(int u, int c) {
  col[u] = c;
  for (auto v : E[u]) {
    if (~col[v]) {
      if (col[v] == c) return 0;
    } else if (!dfs(v, c ^ 1))
      return 0;
  }
  return 1;
}
bool check(int mid) {
  cc = 0;
  memset(col, -1, sizeof col);
  for (int i = (1); i <= (n); ++i) E[i].clear();
  for (int i = (1); i <= (n); ++i)
    for (int j = (i + 1); j <= (n); ++j)
      if (dis[i][j] > mid) {
        E[i].push_back(j);
        E[j].push_back(i);
      }
  for (int i = (1); i <= (n); ++i) {
    if (col[i] == -1) {
      ++cc;
      if (!dfs(i, 0)) return 0;
    }
  }
  return 1;
}
int main() {
  rd(n);
  for (int i = (1); i <= (n); ++i) rd(x[i]), rd(y[i]);
  for (int i = (1); i <= (n); ++i)
    for (int j = (1); j <= (n); ++j)
      dis[i][j] = abs(x[i] - x[j]) + abs(y[i] - y[j]);
  int l = 0, r = 1e4, mid, ans = 1e4;
  while (l <= r) {
    mid = (l + r) / 2;
    if (check(mid))
      ans = mid, r = mid - 1;
    else
      l = mid + 1;
  }
  check(ans);
  printf("%d\n%lld\n", ans, fp(2, cc));
  return 0;
}
