#include <bits/stdc++.h>
using namespace std;
const int MAXN = 500001;
int a[MAXN];
int gap = 0, mx = 0;
set<int> stk;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  int zero = 0;
  for (int i = 1; i <= n; i++) cin >> a[i];
  for (int i = 1; i <= n; i++) {
    mx = max(mx, a[i]);
    if (i > 1) {
      int diff = abs(a[i] - a[i - 1]);
      gap = max(gap, diff);
      if (diff == 0) zero = 1;
      if (diff != 1) {
        stk.insert(diff);
      }
    }
  }
  if (zero) {
    cout << "NO";
    exit(0);
  }
  if (stk.size() > 1) {
    cout << "NO";
    exit(0);
  }
  if (stk.size() == 0) {
    cout << "YES\n";
    cout << 1 << ' ' << mx << "\n";
    exit(0);
  }
  if (stk.size() == 1) {
    int m = *stk.begin();
    int row = (mx - 1) / m + 1;
    for (int i = 2; i <= n; i++) {
      int bef = a[i - 1];
      int br = (bef - 1) / m + 1;
      int cur = a[i];
      int cr = (cur - 1) / m + 1;
      if (abs(bef - cur) != 1) continue;
      if (br != cr) {
        cout << "NO";
        exit(0);
      }
    }
    cout << "YES\n";
    cout << row << ' ' << m;
  }
  return 0;
}
