#include <bits/stdc++.h>
using namespace std;
const int MX = 2e5 + 7;
int n;
int a[MX];
int main() {
  scanf("%d", &n);
  int x = 1e9, y = 1, flag = 1;
  for (int i = 1; i <= n; i++) scanf("%d", a + i);
  for (int i = 2; i <= n; i++) y = max(y, abs(a[i] - a[i - 1]));
  for (int i = 2; i <= n; i++) {
    if (y != 1 && (abs(a[i] - a[i - 1]) == 1)) {
      if ((a[i - 1] - 1) / y != (a[i] - 1) / y) {
        flag = 0;
        break;
      }
    } else {
      if (abs(a[i] - a[i - 1]) != y) {
        flag = 0;
        break;
      }
    }
  }
  if (!flag)
    puts("NO");
  else {
    printf("YES\n%d %d\n", x, y);
  }
  return 0;
}
