#include <bits/stdc++.h>
using namespace std;
long long i, j, n, m, mas[200005], k, aa, z[200005];
int main() {
  std::cin.sync_with_stdio(false);
  std::cin.tie(0);
  cin >> n;
  i = 0;
  while (i < n) {
    cin >> mas[i];
    i++;
  }
  i = 1;
  m = -1;
  while (i < n) {
    k = abs(mas[i] - mas[i - 1]);
    if (k == 0) {
      aa = 1;
    }
    if (k != 1 && k != 0) {
      if (m == -1) {
        m = k;
      } else {
        if (m != k) {
          aa = 1;
        }
      }
    }
    i++;
  }
  if (aa == 0 && m != -1) {
    i = 0;
    while (i < n) {
      mas[i]--;
      i++;
    }
    z[0] = mas[0] / m;
    i = 1;
    while (i < n) {
      z[i] = mas[i] / m;
      if (abs(mas[i] - mas[i - 1]) == 1 && z[i] != z[i - 1]) {
        aa = 1;
      }
      i++;
    }
  }
  if (aa == 0) {
    if (m != -1) {
      cout << "YES\n"
           << "1000000000 " << m;
    } else {
      cout << "YES\n"
           << "1000000000 1000000000";
    }
  } else {
    cout << "NO";
  }
  return 0;
}
