#include <bits/stdc++.h>
using namespace std;
int n;
int fa[5005], dis[5005][5005], siz[10005], col[5005];
int del[10005], tp;
inline void get(int &res) {
  char ch;
  while (!isdigit(ch = getchar()))
    ;
  for (res = ch - '0'; isdigit(ch = getchar()); res = 10 * res + ch - '0')
    ;
}
int x[10005], y[10005];
inline int Pow(int base, int k) {
  int ret = 1;
  for (; k; k >>= 1, base = 1ll * base * base % 1000000007)
    if (k & 1) ret = 1ll * ret * base % 1000000007;
  return ret;
}
bool dfs(int now, int typ, int num) {
  if (col[now] != -1 && col[now] != typ) return 0;
  if (col[now] == -1) {
    col[now] = typ;
    for (int i = 1; i <= n; i++)
      if (i != now && num < dis[now][i] && !dfs(i, typ ^ 1, num)) return 0;
  }
  return 1;
}
inline bool check(int num) {
  memset(col, -1, sizeof col);
  for (int i = 1; i <= n; i++)
    if (col[i] == -1)
      if (!dfs(i, 0, num)) return 0;
  return 1;
}
int main() {
  get(n);
  for (int i = 1; i <= n; i++) {
    get(x[i]), get(y[i]);
    for (int j = 1; j < i; j++)
      dis[i][j] = dis[j][i] = abs(x[i] - x[j]) + abs(y[i] - y[j]);
  }
  int u, v;
  int L = 0, R = 10001, Mid;
  while (L < R) {
    Mid = (L + R) >> 1;
    if (check(Mid))
      R = Mid;
    else
      L = Mid + 1;
  }
  int cnt = 0;
  memset(col, -1, sizeof col);
  for (int i = 1; i <= n; i++)
    if (col[i] == -1) {
      dfs(i, 0, L);
      cnt++;
    }
  printf("%d\n%d\n", L, Pow(2, cnt));
}
