#include <bits/stdc++.h>
using namespace std;
const int N = 5110;
const int mod = 1000000007;
int dis[N][N], n, x[N], y[N], c[N], ans, num;
long long ksm(long long a, long long x) {
  long long ans = 1;
  while (x) {
    if (x & 1) {
      ans = (ans * a) % mod;
    }
    x >>= 1;
    a = (a * a) % mod;
  }
  return ans;
}
bool dfs(int u, int x, int col) {
  for (int i = 1; i <= n; i++) {
    if (dis[u][i] > x) {
      if (c[i] != -1) {
        if (c[i] == col ^ 1) continue;
        if (c[i] == col) return true;
      }
      c[i] = col ^ 1;
      if (dfs(i, x, col ^ 1)) return true;
    }
  }
  return false;
}
bool check(int x) {
  memset(c, -1, sizeof(c));
  for (int i = 1; i <= n; i++) {
    if (c[i] == -1) {
      c[i] = 1;
      if (dfs(i, x, 1)) return false;
    }
  }
  return true;
}
void bfs(int u, int col) {
  queue<int> q;
  c[u] = col;
  q.push(u);
  while (!q.empty()) {
    int u = q.front();
    q.pop();
    for (int i = 1; i <= n; i++) {
      if (c[i]) continue;
      if (dis[i][u] > ans) c[i] = col, q.push(i);
    }
  }
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d%d", &x[i], &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 = 10001;
  while (l <= r) {
    int mid = (l + r) >> 1;
    if (check(mid)) {
      ans = mid;
      r = mid - 1;
    } else
      l = mid + 1;
  }
  printf("%d\n", ans);
  memset(c, 0, sizeof(c));
  for (int i = 1; i <= n; i++) {
    if (c[i] == 0) {
      bfs(i, ++num);
    }
  }
  printf("%lld", ksm(2, num));
}
