#include <bits/stdc++.h>
using namespace std;
const int xn = 5e3 + 9;
const int md = 1e9 + 7;
pair<int, int> xy[xn];
map<int, int> ways;
bool flag, fl1;
int mark[xn], n, fl, bs;
void DFS(int v, int fl) {
  mark[v] = fl;
  int td = 0;
  for (int i = 0; i < n; i++) {
    if ((abs(xy[i].first - xy[v].first)) + (abs(xy[i].second - xy[v].second)) <=
        bs)
      continue;
    if (((mark[i] == 1 and fl == 1) or (mark[i] == 2 and fl == 2))) fl1 = true;
    if (mark[i] != 0) continue;
    td++;
    if (fl == 1)
      DFS(i, 2);
    else
      DFS(i, 1);
  }
  if (td > 0) flag = true;
}
bool check(long long x) {
  bs = x;
  fl1 = 0, fl = 0, flag = 0;
  for (int i = 0; i < n; i++) mark[i] = 0;
  int ns = 0;
  for (int i = 0; i < n; i++)
    if (mark[i] == 0) DFS(i, 1), ns++;
  if (!flag) ns--;
  ways[x] = ns;
  return (!fl1);
}
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) cin >> xy[i].first >> xy[i].second;
  long long l = -1, r = 1e4 + 10, mid;
  while (r - l > 1) {
    mid = (l + r) / 2;
    if (check(mid))
      r = mid;
    else
      l = mid;
  }
  long long ans = 1;
  for (int i = 0; i < ways[r]; i++) ans *= 2, ans += md, ans %= md;
  cout << r << '\n';
  cout << ans << '\n';
  return 0;
}
