#include <bits/stdc++.h>
using namespace std;
bool cmp(pair<long long int, char> p1, pair<long long int, char> p2) {
  return p1.first > p2.first;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int n;
  cin >> n;
  long long int a[n], i, x = -1, y = -1;
  for (i = 0; i < n; i++) {
    cin >> a[i];
    if (i != 0) {
      if (a[i] == a[i - 1]) {
        cout << "NO\n";
        return 0;
      }
      if (a[i] == a[i - 1] + 1 or a[i] == a[i - 1] - 1) {
        continue;
      } else if (y == -1) {
        y = abs(a[i] - a[i - 1]);
      } else if (y != -1 and y != abs(a[i] - a[i - 1])) {
        cout << "NO\n";
        return 0;
      }
    }
  }
  if (y == -1) y = 1;
  for (i = 0; i < n; i++) {
    x = max((a[i] - 1) / y, x);
    if (i != 0 and a[i] == a[i - 1] + 1 and a[i - 1] % y == 0 and y != 1) {
      cout << "NO\n";
      return 0;
    }
    if (i != 0 and a[i] == a[i - 1] - 1 and a[i] % y == 0 and y != 1) {
      cout << "NO\n";
      return 0;
    }
  }
  cout << "YES\n1000000000 " << y << "\n";
}
