#include <bits/stdc++.h>
#pragma GCC optimize("O3")
#pragma comment(linker, "/STACK:1024000000,1024000000")
using namespace std;
const int INF = 2147483647;
const long long LINF = 9223372036854775807;
const double EPS = 1e-10;
const int MOD = 1e9 + 7;
int n;
pair<short, short> pos[5005];
vector<pair<short, short> > G[5005];
int v[5005], ans = 1;
inline void enableFileIO(const string &fileName) {
  if (fileName.empty()) return;
  freopen((fileName + ".in").c_str(), "r", stdin);
  freopen((fileName + ".out").c_str(), "w", stdout);
  return;
}
inline int getDist(int &i, int &j) {
  return abs(pos[i].first - pos[j].first) + abs(pos[i].second - pos[j].second);
}
bool dfs(int k, int mid, int clr) {
  v[k] = clr;
  clr = 3 - clr;
  for (auto i : G[k]) {
    if (i.first <= mid) continue;
    if (v[i.second] == v[k] || (v[i.second] == 0 && !dfs(i.second, mid, clr)))
      return false;
  }
  return true;
}
inline bool check(int &mid) {
  memset(v, 0, sizeof v);
  bool flag = true;
  for (int i = 0; i < n; i++)
    if (!v[i]) flag &= dfs(i, mid, 1);
  return flag;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  enableFileIO("");
  cin >> n;
  for (int i = 0; i < n; i++) cin >> pos[i].first >> pos[i].second;
  for (int i = 0; i < n; i++)
    for (int j = i + 1; j < n; j++)
      G[i].push_back(make_pair(getDist(i, j), j)),
          G[j].push_back(make_pair(getDist(i, j), i));
  int l = -1, r = 10001, mid;
  while (r - l > 1) {
    mid = (l + r) >> 1;
    if (check(mid))
      r = mid;
    else
      l = mid;
  }
  memset(v, 0, sizeof v);
  for (int i = 0; i < n; i++)
    if (!v[i]) dfs(i, r, 1), ans *= 2, ans %= MOD;
  cout << r << endl;
  cout << ans << endl;
  return 0;
}
