#include <bits/stdc++.h>
using namespace std;
long long a[1000000];
signed main() {
  long long n;
  cin >> n;
  for (long long i = 1; i <= n; i++) {
    cin >> a[i];
  }
  long long n1 = 0;
  bool l = 1;
  for (long long i = 1; i <= n - 1; i++) {
    if (a[i] == a[i + 1]) {
      l = 0;
    }
    if (abs(a[i + 1] - a[i]) != 1) {
      if (n1 == 0) {
        n1 = abs(a[i + 1] - a[i]);
      } else if (abs(a[i + 1] - a[i]) != n1) {
        l = 0;
      }
    }
  }
  n1 = max((long long)1, n1);
  for (long long i = 1; i <= n - 1; i++) {
    long long tx1 = (a[i] - 1) / n1, ty1 = (a[i] - 1) % n1;
    long long tx2 = (a[i + 1] - 1) / n1, ty2 = (a[i + 1] - 1) % n1;
    if (abs(tx1 - tx2) + abs(ty1 - ty2) != 1) {
      l = 0;
    }
  }
  if (l == 1) {
    cout << "YES" << endl;
    cout << 1000000000 << " " << n1 << endl;
  } else {
    cout << "NO" << endl;
  }
  return 0;
}
