#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; i++) cin >> a[i];
  int y = -1;
  int ans = 0;
  for (int i = 1; i < n; i++) {
    int x = a[i] - a[i - 1];
    if (x == 0) {
      cout << "NO" << endl;
      return 0;
    }
    if (abs(x) == 1) {
      ans += x;
      continue;
    }
    if (y == -1) {
      if (abs(x) < ans) {
        cout << "NO" << endl;
        return 0;
      }
      y = abs(x);
      continue;
    }
    if (y != abs(x)) {
      cout << "NO" << endl;
      return 0;
    }
  }
  if (y == -1) y = 1000000000;
  for (int i = 0; i < n - 1; i++) {
    int p = a[i] / y;
    if (a[i] % y) p++;
    int q = a[i + 1] / y;
    if (a[i + 1] % y) q++;
    if (p != q && abs(a[i] - a[i + 1]) != y) {
      cout << "NO" << endl;
      return 0;
    }
  }
  cout << "YES" << endl;
  cout << "1000000000"
       << " " << y << endl;
}
