#include <bits/stdc++.h>
using namespace std;
int a[200005];
int main() {
  cin.tie(0);
  ios_base::sync_with_stdio(0);
  int n;
  cin >> n;
  bool flag = 0;
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = 0; i < n - 1; i++)
    if (a[i] == a[i + 1]) return cout << "NO", 0;
  for (int i = 0; i < n - 1; i++)
    if (abs(a[i + 1] - a[i]) != 1) flag = 1;
  if (!flag) return cout << "YES\n" << 1000000000 << ' ' << 1, 0;
  int tmp = 0;
  for (int i = 0; i < n - 1; i++) {
    if (abs(a[i + 1] - a[i]) != 1) {
      tmp = abs(a[i + 1] - a[i]);
      break;
    }
  }
  for (int i = 0; i < n - 1; i++) {
    if (abs(a[i + 1] - a[i]) == 1) {
      if ((a[i + 1] - 1) / tmp != (a[i] - 1) / tmp) return cout << "NO", 0;
    } else if (abs(a[i + 1] - a[i]) != tmp)
      return cout << "NO", 0;
  }
  cout << "YES\n" << 1000000000 << ' ' << tmp;
  return 0;
}
