#include <bits/stdc++.h>
using namespace std;
const double DINF = numeric_limits<double>::infinity();
const long long MOD = 1e9 + 7;
const double EPS = 1e-7;
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
mt19937 mmtw(MOD);
long long rnd(long long x, long long y) {
  static uniform_int_distribution<long long> d;
  return d(mmtw) % (y - x + 1) + x;
}
template <class T>
T fact(T n) {
  if (n == 1) return 1;
  return n * fact(n - 1);
}
const int MAXN = 2e5 + 5;
int k;
long long a[MAXN];
long long n = 1, m = -1;
long long get_m() {
  for (int i = 1; i < k; ++i) {
    if (a[i] == a[i - 1] + 1 || a[i] == a[i - 1] - 1) continue;
    return abs(a[i] - a[i - 1]);
  }
  exit(1);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> k;
  for (int i = 0; i < k; ++i) {
    cin >> a[i];
    a[i]--;
  }
  bool flag = true;
  long long mx = a[0];
  for (int i = 1; i < k; ++i) {
    if (a[i] == a[i - 1]) {
      cout << "NO" << endl;
      return 0;
    }
    if (a[i] != a[i - 1] + 1 && a[i] != a[i - 1] - 1) {
      flag = false;
      break;
    }
    mx = max(mx, a[i]);
  }
  if (flag) {
    cout << "YES" << endl;
    cout << "1000000000 " << mx + 1 << endl;
    return 0;
  }
  m = get_m();
  for (int i = 1; i < k; ++i) {
    if ((a[i - 1] % m != m - 1) && a[i] == a[i - 1] + 1) continue;
    if ((a[i - 1] % m != 0) && a[i] == a[i - 1] - 1) continue;
    if (a[i] == a[i - 1] + m || a[i] == a[i - 1] - m) continue;
    cout << "NO" << endl;
    return 0;
  }
  cout << "YES" << endl;
  cout << 1000000000 << " " << m << endl;
  return 0;
}
