#include <bits/stdc++.h>
const int MAXN = 2e5 + 5;
int a[MAXN], n, ny;
inline int abs(int x) { return x < 0 ? -x : x; }
int GetY() {
  for (int i = 2; i <= n; i++)
    if (abs(a[i] - a[i - 1]) != 1) return abs(a[i] - a[i - 1]);
  return 1000000000;
}
void GetPos(int n, int &x, int &y) {
  n--;
  x = n / ny + 1;
  y = n % ny + 1;
}
bool check(int x1, int y1, int x2, int y2) {
  if (abs(x1 - x2) == 1 && abs(y1 - y2) == 0) return 1;
  if (abs(y1 - y2) == 1 && abs(x1 - x2) == 0) return 1;
  return 0;
}
int main(int argc, char *argv[]) {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", a + i);
  ny = GetY();
  if (ny == 0) return printf("NO"), 0;
  for (int i = 2; i <= n; i++) {
    int x1, x2, y1, y2;
    GetPos(a[i - 1], x1, y1);
    GetPos(a[i], x2, y2);
    if (!check(x1, y1, x2, y2)) return printf("NO"), 0;
  }
  printf("YES\n1000000000 %d", ny);
  return 0;
}
