#include <bits/stdc++.h>
using namespace std;
const int N = 10010;
const long long mod = 1000000007ll;
int n, cnt, mx;
long long ans;
int vis[N], X[N], Y[N], fa[N];
int dis(int i, int j) { return abs(X[i] - X[j]) + abs(Y[i] - Y[j]); }
int find(int x) { return x == fa[x] ? x : fa[x] = find(fa[x]); }
long long power(long long x, long long t) {
  long long ret = 1;
  for (; t; t >>= 1, x = x * x % mod)
    if (t & 1) ret = ret * x % mod;
  return ret;
}
bool dfs(int u, int c, int x) {
  vis[u] = c;
  for (int i = 1; i <= n; ++i)
    if (dis(u, i) > x) {
      if (vis[i] == -1) {
        if (!dfs(i, c ^ 1, x)) return false;
      } else if (vis[i] == vis[u])
        return false;
    }
  return true;
}
bool check(int x) {
  ans = 1ll;
  memset(vis, -1, sizeof(vis));
  for (int i = 1; i <= n; ++i)
    if (vis[i] == -1) {
      if (dfs(i, 0, x))
        ans = ans * 2ll % mod;
      else
        return false;
    }
  return true;
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) scanf("%d%d", &X[i], &Y[i]);
  int l = -1, r = 10010, ans1 = 0;
  while (r - l > 1) {
    int mid = (l + r) >> 1;
    if (check(mid))
      r = ans1 = mid;
    else
      l = mid;
  }
  check(ans1);
  printf("%d\n%lld\n", ans1, ans);
  return 0;
}
