#include <bits/stdc++.h>
using namespace std;
long long n, m;
bool test = false, test1 = false;
long long const N = 2 * 1e5 + 7;
long long const oo = 1000000007;
vector<long long> v, v1;
vector<pair<long long, long long> > vv;
map<long long, long long> my, my1;
priority_queue<long long> q;
long long t[N];
long long dx[4] = {0, 1, 0, -1};
long long dy[4] = {1, 0, -1, 0};
bool verif(long long i, long long j) {
  if (i >= 0 && i < n && j >= 0 && j < m) return true;
  return false;
}
vector<long long> v2[N];
long long z[N];
void dfs(long long s) {
  if (z[s]) return;
  z[s] = 1;
  for (long long u = 0; u < v2[s].size(); u++) {
    dfs(v2[s][u]);
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long i = 0, j = 0, a = 0, b = 0, c = 0, d = -1e18, x = 0, y = 0, s = 0,
            r, l, k;
  string s1, s2, s3, s4, s5;
  cin >> n;
  for (i = 0; i < n; i++) {
    cin >> a;
    v.push_back(a);
  }
  test = false;
  c = 0;
  for (i = 1; i < n; i++) {
    k = abs(v[i] - v[i - 1]);
    if (k == 0) {
      cout << "NO";
      return 0;
    } else if (k != 1) {
      if (test) {
        if (k != c) {
          cout << "NO";
          return 0;
        }
      } else {
        c = k;
        test = true;
      }
    } else {
      if (test) {
        if ((min(v[i], v[i - 1])) % c == 0) {
          cout << "NO";
          return 0;
        }
      }
    }
  }
  for (i = 1; i < n; i++) {
    k = abs(v[i] - v[i - 1]);
    if (test && k == 1) {
      if (min(v[i], v[i - 1]) % c == 0) {
        cout << "NO";
        return 0;
      }
    }
  }
  cout << "YES" << endl;
  if (test) {
    cout << 1000000000 << " " << c;
  } else
    cout << 1000000000 << " " << 1000000000;
  return 0;
}
