#include <bits/stdc++.h>
void Get(int &T) {
  char C;
  bool F = 0;
  for (; C = getchar(), C < '0' || C > '9';)
    if (C == '-') F = 1;
  for (T = C - '0'; C = getchar(), C >= '0' && C <= '9'; T = T * 10 + C - '0')
    ;
  F && (T = -T);
}
int N;
int X[5005];
int Y[5005];
void Init() {
  Get(N);
  for (int i = 1; i <= N; i++) {
    Get(X[i]);
    Get(Y[i]);
  }
}
int Dis[5005][5005];
int Color[5005];
int Len;
int DFS(int X) {
  for (int i = 1; i <= N; i++)
    if (Dis[X][i] > Len) {
      if (Color[X] == Color[i]) return 0;
      if (Color[i] == 0) {
        Color[i] = 3 - Color[X];
        if (DFS(i) == 0) return 0;
      }
    }
  return 1;
}
int Check() {
  memset(Color, 0, sizeof Color);
  int Ans = 0;
  for (int i = 1; i <= N; i++) {
    if (Color[i] == 0) {
      Color[i] = 1;
      Ans++;
      if (DFS(i) == 0) return -1;
    }
  }
  return Ans;
}
int Bin(int L, int R) {
  for (;;) {
    if (L == R) return L;
    if (L + 1 == R) {
      Len = L;
      if (Check() > -1) return L;
      return R;
    }
    int Mid = L + R;
    Mid >>= 1;
    Len = Mid;
    if (Check() > -1)
      R = Mid;
    else
      L = Mid;
  }
}
int Ans;
int Ans2;
void Work() {
  for (int i = 1; i <= N; i++)
    for (int j = i + 1; j <= N; j++)
      Dis[j][i] = Dis[i][j] = std::abs(X[i] - X[j]) + std::abs(Y[i] - Y[j]);
  Ans = Bin(0, 10000);
  Len = Ans;
  Ans2 = 1;
  for (int i = Check(); i >= 1; i--) {
    (Ans2 = Ans2 + Ans2) %= (1000000007);
  }
}
void Output() { printf("%d\n%d\n", Ans, Ans2); }
int main() {
  Init();
  Work();
  Output();
  return 0;
}
