#include <bits/stdc++.h>
using namespace std;
const long long int Maxn3 = 1e3 + 10;
const long long int Maxn4 = 1e4 + 10;
const long long int Maxn5 = 1e5 + 10;
const long long int Maxn6 = 1e6 + 10;
const long long int Maxn7 = 1e7 + 10;
const long long int Maxn8 = 1e8 + 10;
const long long int Maxn9 = 1e9 + 10;
const long long int Maxn18 = 1e18 + 10;
const long long int Mod1 = 1e7 + 7;
const long long int Mod2 = 1e9 + 7;
const long long int LLMax = LLONG_MAX;
const long long int LLMin = LLONG_MIN;
const long long int INTMax = INT_MAX;
const long long int INTMin = INT_MIN;
long long int mn = LLMax, mx = LLMin;
const int MX = 2e5 + 100;
long long int c[MX];
int main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  long long int n, k = 0;
  cin >> n;
  for (long long int i = 0; i < n; i++) cin >> c[i];
  bool m = 0;
  for (long long int i = 1; i < n; i++) {
    long long int p = abs(c[i] - c[i - 1]);
    if (!p) return cout << "NO", 0;
    if (p > 1) {
      m = 1;
      k = p;
      break;
    }
  }
  if (!m) {
    cout << "YES" << '\n';
    return cout << 1 << ' ' << 1000000000, 0;
  }
  for (long long int i = 1; i < n; i++) {
    long long int p = abs(c[i] - c[i - 1]);
    if (!p || (p != 1 and p != k) ||
        (p == 1 and ((c[i] % k == 0 and c[i - 1] == c[i] + 1) ||
                     (c[i - 1] % k == 0 and c[i] == c[i - 1] + 1))))
      return cout << "NO", 0;
  }
  cout << "YES" << endl;
  cout << 1000000000 << ' ' << k;
  return 0;
}
