#include <bits/stdc++.h>
using namespace std;
int n;
pair<short, short> p[5005];
vector<pair<short, short> > adj[5005];
int v[5005];
inline int getdist(int i, int j) {
  return abs(p[i].first - p[j].first) + abs(p[i].second - p[j].second);
}
bool dfs(int k, int m, int f) {
  bool flag = true;
  v[k] = f;
  f = 3 - f;
  for (int i = (int)adj[k].size() - 1; i >= 0; i--) {
    if (adj[k][i].first <= m) continue;
    if (v[adj[k][i].second] == v[k] ||
        (v[adj[k][i].second] == 0 && !dfs(adj[k][i].second, m, f)))
      return false;
  }
  return flag;
}
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) cin >> p[i].first >> p[i].second;
  for (int i = 0; i < n; i++)
    for (int j = i + 1; j < n; j++)
      adj[i].push_back(make_pair(getdist(i, j), j)),
          adj[j].push_back(make_pair(getdist(i, j), i));
  int l = -1, r = 10001, m = 0, num = 0;
  bool flag;
  while (r - l > 1) {
    flag = true;
    num = 0;
    m = (l + r) >> 1;
    memset(v, 0, sizeof v);
    for (int i = 0; i < n; i++) {
      if (!v[i]) flag &= dfs(i, m, 1);
    }
    if (flag)
      r = m;
    else
      l = m;
  }
  num = 0;
  memset(v, 0, sizeof v);
  for (int i = 0; i < n; i++) {
    if (!v[i]) dfs(i, r, 1), num++;
  }
  cout << r << endl;
  unsigned long long res = 1;
  for (int i = 0; i < num; i++) {
    res = res * 2 % 1000000007;
  }
  cout << res << endl;
  return 0;
}
