#include <bits/stdc++.h>
using namespace std;
int a[200010];
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  int ansY = INT_MIN;
  bool possible = true;
  for (int i = 1; i < n; i++) {
    if (abs(a[i - 1] - a[i]) == 1) continue;
    if (abs(a[i - 1] - a[i]) == 0) {
      possible = false;
      break;
    } else {
      if (ansY != INT_MIN) {
        if (abs(a[i - 1] - a[i]) != ansY) {
          possible = false;
          break;
        }
      } else
        ansY = abs(a[i - 1] - a[i]);
    }
  }
  if (!possible) {
    cout << "NO\n";
    return 0;
  }
  if (ansY == INT_MIN)
    cout << "YES\n1 1000000000\n";
  else {
    for (int i = 1; i < n; i++) {
      if (a[i] % ansY == 0) {
        if (a[i - 1] - a[i] == 1) possible = false;
      }
      if ((a[i] - 1) % ansY == 0) {
        if (a[i - 1] - a[i] == -1) possible = false;
      }
    }
    if (!possible) {
      cout << "NO\n";
      return 0;
    }
    cout << "YES\n1000000000 " << ansY << '\n';
  }
}
