#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
long long ar[200009];
set<long long> ss, st;
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long n;
  cin >> n;
  for (long long i = 1; i <= n; i++) cin >> ar[i];
  for (long long i = 1; i < n; i++) {
    long long x = abs(ar[i] - ar[i + 1]);
    if (x == 0) {
      cout << "NO" << endl;
      return 0;
    }
    if (x > 1) st.insert(x);
  }
  if (st.size() == 0)
    cout << "YES\n1 1000000000" << endl;
  else if (st.size() == 1) {
    long long xx = *(st.begin());
    ss.clear();
    for (long long i = 1; i < n; i++) {
      long long x = ar[i], y = ar[i + 1];
      if (abs(x - y) == 1) {
        if (x % xx == 1) {
          if (y != x + 1) {
            cout << "NO" << endl;
            return 0;
          }
        } else if (x % xx == 0) {
          if (y != x - 1) {
            cout << "NO" << endl;
            return 0;
          }
        }
      }
    }
    cout << "YES\n1000000000 " << xx << endl;
  } else
    cout << "NO" << endl;
}
