#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:536870912")
#pragma warning(disable : 4996)
using namespace std;
const int N = 2e5 + 100;
int a[N];
int main() {
  int n;
  scanf("%d", &n);
  int x = -1, y = -1, mxy = 0, mxval = 0;
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i]);
    mxval = max(mxval, a[i]);
  }
  for (int i = 1; i < n; i++) {
    if (a[i] == a[i - 1]) {
      printf("NO");
      return 0;
    }
    if (abs(a[i] - a[i - 1]) != 1) {
      int cy = abs(a[i] - a[i - 1]);
      if (y == -1)
        y = cy;
      else if (cy != y) {
        printf("NO");
        return 0;
      }
    } else
      mxy = max(mxy, max(a[i], a[i - 1]));
  }
  if (y == -1) y = mxval;
  for (int i = 0; i < n - 1; i++) {
    if (abs(a[i] - a[i + 1]) == 1 && (a[i] - 1) / y != (a[i + 1] - 1) / y) {
      printf("NO");
      return 0;
    }
  }
  printf("YES\n");
  printf("%d %d", (mxval - 1) / y + 1, y);
  return 0;
}
