#include <bits/stdc++.h>
using namespace std;
const long long D = 1000LL * 1000 * 1000 + 7;
const int MAX = 5000;
int dd[MAX + 2][MAX + 2];
bool mrk[MAX + 2];
pair<int, int> p[MAX + 2];
bool c[MAX + 2];
int comp;
int head;
int n;
inline int abs(int a) { return (a < 0 ? -a : a); }
inline int dis(int a, int b) {
  return abs(p[a].first - p[b].first) + abs(p[a].second - p[b].second);
}
void clear() {
  for (int i = 0; i < n; i++) {
    mrk[i] = false;
  }
  comp = 0;
}
bool dfs(int v, int d) {
  mrk[v] = true;
  for (int i = 0; i < n; i++) {
    if (dd[v][i] > d) {
      if (!mrk[i]) {
        c[i] = !c[v];
        if (dfs(i, d)) return true;
      } else {
        if (c[v] == c[i]) return true;
      }
    }
  }
  return false;
}
bool check(int d) {
  clear();
  for (int i = 0; i < n; i++)
    if (!mrk[i]) {
      if (dfs(i, d)) return false;
      comp++;
    }
  return true;
}
int bin_search(int s, int e) {
  if (e <= s + 1) return e;
  int m = (s + e) / 2;
  if (check(m))
    return bin_search(s, m);
  else
    return bin_search(m, e);
}
int main() {
  ios::sync_with_stdio(false);
  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++) dd[i][j] = dd[j][i] = dis(i, j);
  int ret = bin_search(-1, 2 * MAX);
  check(ret);
  long long out = 1;
  for (int i = 0; i < comp; i++) {
    out *= 2;
    out %= D;
  }
  cout << ret << endl << out << endl;
  return 0;
}
