#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,sse3,sse4,popcnt,abm,mmx")
using namespace std;
template <typename T>
T sqr(T a) {
  return a * a;
}
template <typename T>
T _pow(T number, int power, bool flag = false) {
  if (power < 0) {
    power = abs(power);
    flag = true;
  }
  T result = 1;
  while (power) {
    if (power & 1) result *= number;
    number *= number;
    power >>= 1;
  }
  return ((flag) ? (1 / result) : result);
}
template <typename T>
void show(T text, bool error = 0) {
  if (error)
    cerr << "--> " << text << " <--" << endl;
  else
    cout << "--> " << text << " <--" << endl;
}
const long long INF = (long long)1e18;
const int inf = (int)1e9;
const int N = (int)2e5 + 10;
const int MOD = (int)1e9 + 7;
const int base = 998244353;
const double eps = (double)1e-9;
const double PI = acos(-1.0);
const int dx[] = {1, -1, 0, 0}, dy[] = {0, 0, 1, -1};
void in();
void out();
void PREMAIN();
void precalc();
void solve();
int main() {
  PREMAIN();
  in();
  precalc();
  solve();
  out();
}
void PREMAIN() {
  ios_base ::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
}
long long n, x, y = -1;
long long a[N];
void in() {
  cin >> n;
  for (int i = 1; i <= n; ++i) {
    cin >> a[i];
  }
}
void precalc() {
  x = y = -1;
  x = max(x, a[1]);
  if (n == 1) cout << "YES" << endl << 1 << ' ' << a[1], exit(0);
}
void solve() {
  for (int i = 2; i <= n; ++i) {
    x = max(x, a[i]);
    if (a[i] == a[i - 1]) cout << "NO", exit(0);
    if (abs(a[i] - a[i - 1]) != 1 && y == -1)
      y = abs(a[i] - a[i - 1]);
    else if (abs(a[i] - a[i - 1]) != 1 && y != abs(a[i] - a[i - 1]))
      cout << "NO", exit(0);
  }
  if (y == -1) y = x, x = 1;
  for (int i = 2; i <= n; ++i) {
    int pos = a[i] / y + (a[i] % y != 0);
    int pos1 = a[i - 1] / y + (a[i - 1] % y != 0);
    if (abs(a[i] - a[i - 1]) == 1 && pos != pos1) cout << "NO", exit(0);
    if (abs(a[i] - a[i - 1]) != 1 && y != abs(a[i] - a[i - 1]))
      cout << "NO", exit(0);
  }
  x = x / y + (x % y != 0);
}
void out() {
  cout << "YES" << endl;
  cout << x << ' ' << y << endl;
}
