#include <bits/stdc++.h>
using namespace std;
inline int rint() {
  int a;
  scanf("%d", &a);
  return a;
}
inline long long rll() {
  long long a;
  scanf("%I64d", &a);
  return a;
}
inline double rdouble() {
  double a;
  scanf("%lf", &a);
  return a;
}
int gcd(int a, int b) { return (b) ? gcd(b, a % b) : a; }
int a[200005];
int main() {
  int n = rint();
  int maxx = 0;
  for (int i = 1; i <= n; i++) a[i] = rint(), maxx = max(maxx, a[i]);
  int flag = 0;
  for (int i = 2; i <= n; i++) {
    if (abs(a[i] - a[i - 1]) == 0) {
      cout << "NO" << endl;
      return 0;
    }
    if (abs(a[i] - a[i - 1]) != 1) flag = 1;
  }
  if (flag == 0) {
    cout << "YES" << endl;
    cout << 1 << " " << maxx << endl;
    return 0;
  }
  int res = -1;
  for (int i = 2; i <= n; i++) {
    int temp = abs(a[i] - a[i - 1]);
    if (temp == 1) continue;
    if (res == -1) {
      res = temp;
      continue;
    }
    if (res != temp) {
      cout << "NO" << endl;
      return 0;
    }
  }
  for (int i = 2; i <= n; i++) {
    int temp = abs(a[i] - a[i - 1]);
    if (temp == 1) {
      if (min(a[i], a[i - 1]) % res == 0) {
        cout << "NO" << endl;
        return 0;
      }
    }
  }
  cout << "YES" << endl;
  cout << maxx / res + 1 << " " << res << endl;
  return 0;
}
