#include <bits/stdc++.h>
using namespace std;
const int Maxn = 5000 + 10, C = 1000000007;
int node[Maxn][2], n, ted;
int adj[Maxn][Maxn], lim;
int mark[Maxn];
void input() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%d%d", &node[i][0], &node[i][1]);
    for (int j = 0; j < i; j++) {
      int dis = abs(node[i][0] - node[j][0]) + abs(node[i][1] - node[j][1]);
      adj[i][j] = adj[j][i] = dis;
    }
  }
}
void dfs(int u, int c) {
  mark[u] = c;
  for (int i = 0; i < n; i++)
    if (adj[u][i] > lim && i != u) {
      if (!mark[i])
        dfs(i, 3 - c);
      else {
        if (mark[i] == mark[u]) throw 1;
      }
    }
}
bool dfs_all() {
  for (int i = 0; i < n; i++) mark[i] = 0;
  ted = 0;
  try {
    for (int i = 0; i < n; i++)
      if (!mark[i]) {
        ted++;
        dfs(i, 1);
      }
  } catch (int x) {
    return false;
  }
  return true;
}
void bs() {
  int s = -1, t = Maxn * 2;
  while (t - s > 1) {
    int mid = (s + t) / 2;
    lim = mid;
    if (dfs_all())
      t = mid;
    else
      s = mid;
  }
  cout << t << endl;
  lim = t;
  dfs_all();
  int ans = 1;
  for (int i = 0; i < ted; i++) ans = (ans * 2) % C;
  cout << ans << endl;
  return;
}
int main() {
  input();
  bs();
  return 0;
}
