#include <bits/stdc++.h>
using namespace std;
long long n, i, j, k, l, sum = 0, flag = 0, t, a[200005], maxi = 0, second,
                         first;
set<long long> s;
bool check(long long first, long long second) {
  if (second > 1000000000) return false;
  int row = (a[0] - 1) / second, col = (a[0] - 1) % second;
  for (int i = 1; i < n; i++) {
    int cur_row = (a[i] - 1) / second;
    int cur_col = (a[i] - 1) % second;
    if (abs(cur_row - row) + abs(cur_col - col) != 1) {
      return false;
    }
    row = cur_row;
    col = cur_col;
  }
  return true;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  if (n == 1) {
    cout << "YES\n1 1000000000";
    return 0;
  }
  for (i = 0; i < n; i++) {
    cin >> a[i];
    if (i) {
      s.insert(abs(a[i] - a[i - 1]));
    }
    maxi = max(maxi, a[i]);
  }
  if (*s.begin() == 0 || s.size() > 2 || (s.size() == 2 && *s.begin() != 1)) {
    cout << "NO\n";
    return 0;
  }
  if (s.size() == 2 || *s.begin() != 1) {
    second = *s.rbegin();
    first = ((maxi + second - 1) / second);
  } else {
    first = 1;
    second = 1000000000;
  }
  if (check(first, second)) {
    cout << "YES\n";
    cout << first << " " << second << '\n';
    return 0;
  }
  cout << "NO\n";
  return 0;
}
