#include <bits/stdc++.h>
using namespace std;
int main(int argc, char** argv) {
  ios_base::sync_with_stdio(0);
  int n;
  cin >> n;
  set<long long> dis;
  long long A[n];
  for (int i = 0; i < n; i++) {
    cin >> A[i];
    if (i) {
      long long abs = A[i] - A[i - 1];
      if (abs == 0) {
        cout << "NO" << endl;
        return 0;
      }
      if (abs < 0) abs = -abs;
      dis.insert(abs);
    }
  }
  if (dis.size() > 2) {
    cout << "NO" << endl;
    return 0;
  }
  if (dis.size() == 0) {
    cout << "YES" << endl;
    cout << "1000000000 1000000000" << endl;
    return 0;
  }
  if (dis.size() == 1) {
    cout << "YES" << endl;
    cout << "1000000000 " << *dis.begin() << endl;
    return 0;
  }
  auto it = dis.begin();
  long long x = *it++;
  long long y = *it;
  if (x != 1 && y != 1) {
    cout << "NO" << endl;
    return 0;
  }
  long long z = x * y;
  y = (A[0] - 1) / z + 1;
  x = A[0] - (y - 1) * z;
  long long a, b, c, d;
  for (int i = 1; i < n; i++) {
    a = b = c = d = 0;
    if (x > 1) {
      a = A[i - 1] - 1;
    }
    if (x < z) {
      b = A[i - 1] + 1;
    }
    if (y > 1) {
      c = A[i - 1] - z;
    }
    if (true) {
      d = A[i - 1] + z;
    }
    if (A[i] != a && A[i] != b && A[i] != c && A[i] != d) {
      cout << "NO" << endl;
      return 0;
    }
    y = (A[i] - 1) / z + 1;
    x = A[i] - (y - 1) * z;
  }
  cout << "YES" << endl;
  cout << "1000000000 " << z << endl;
  return 0;
}
