#include <bits/stdc++.h>
using namespace std;
const long double pi = 3.14159265359;
signed main() {
  long long n;
  cin >> n;
  vector<long long> a(n);
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
    a[i]--;
  }
  long long x = 1000000000, y = -1;
  for (long long i = 0; i < n - 1; i++)
    if (a[i] == a[i + 1]) {
      cout << "NO";
      return 0;
    }
  for (long long i = 0; i < n - 1; i++) {
    if (abs(a[i] - a[i + 1]) == 1) continue;
    if (y == -1)
      y = abs(a[i] - a[i + 1]);
    else if (y != abs(a[i] - a[i + 1])) {
      cout << "NO";
      return 0;
    }
  }
  if (y == -1) y = 1000000000;
  for (long long i = 0; i < n - 1; i++) {
    if (abs(a[i] - a[i + 1]) == 1) {
      if (a[i] / y != a[i + 1] / y) {
        cout << "NO";
        return 0;
      }
    }
  }
  cout << "YES\n";
  cout << x << ' ' << y;
  return 0;
}
