#include <bits/stdc++.h>
using namespace std;
const int maxn = 5e3 + 19;
vector<pair<int, int> > v;
vector<int> adj[maxn];
int clr[maxn], n, m = 0;
long long int MOD = 1e9 + 7;
bool DFS(int v, int c) {
  clr[v] = c;
  for (int i = 0; i < adj[v].size(); i++) {
    int u = adj[v][i];
    if (clr[u] == -1) {
      if (!DFS(u, 1 - c)) return false;
    } else if (clr[u] == c)
      return false;
  }
  return true;
}
bool isval(int x) {
  m = 0;
  for (int i = 0; i < n; i++) adj[i].clear(), clr[i] = -1;
  for (int i = 0; i < n; i++) {
    for (int j = i + 1; j < n; j++) {
      int dis = abs(v[i].first - v[j].first) + abs(v[i].second - v[j].second);
      if (dis > x) {
        adj[i].push_back(j);
        adj[j].push_back(i);
      }
    }
  }
  for (int i = 0; i < n; i++)
    if (clr[i] == -1) {
      m++;
      if (!DFS(i, 0)) return false;
    }
  return true;
}
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  int x, y;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> x >> y;
    v.push_back(make_pair(x, y));
  }
  int lo = -1, hi = 1e4 + 19;
  while (hi - lo > 1) {
    int mid = (hi + lo) / 2;
    if (isval(mid))
      hi = mid;
    else
      lo = mid;
  }
  cout << hi << "\n";
  isval(hi);
  int ans = 1;
  for (int i = 0; i < m; i++) ans = (ans * 2) % MOD;
  cout << ans % MOD;
  return 0;
}
