#include <bits/stdc++.h>
using namespace std;
const int maxn = 5000 + 10;
int dis[maxn][maxn], n, mid;
int col[maxn];
bool marked[maxn];
pair<int, int> p[maxn];
bool f = true, t;
void dfs(int node) {
  for (int i = 0; i < n; i++) {
    if (i != node) {
      if (dis[node][i] > mid) {
        if (col[i] == 0) {
          col[i] = 3 - col[node];
          dfs(i);
        } else {
          if (col[i] != 3 - col[node]) {
            f = false;
            return;
          }
        }
      }
    }
  }
}
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> p[i].first >> p[i].second;
    for (int j = 0; j < n; j++)
      dis[i][j] = dis[j][i] =
          abs(p[i].first - p[j].first) + abs(p[i].second - p[j].second);
  }
  long long ans;
  int start = 0, end = 10001;
  t = true;
  while (t) {
    ans = 1;
    mid = (start + end) / 2;
    fill(col, col + n, 0);
    for (int i = 0; i < n; i++) {
      if (col[i] == 0) {
        col[i] = 1;
        ans = (ans * 2) % 1000000007;
        dfs(i);
        if (!f) break;
      }
    }
    if ((end - start) < 2) {
      if (f) {
        mid = start;
        t = false;
      } else {
        start = mid + 1;
        end = mid + 2;
        f = true;
      }
    } else {
      if (!f) {
        start = mid + 1;
        f = !f;
      } else
        end = mid;
    }
  }
  cout << mid << " " << ans;
  return 0;
}
