#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
const long double eps = 1e-9;
const long long maxn = 1e9;
const long long inf = 5e18;
const long long minf = -inf;
bool solve() {
  long long n, y = 1;
  cin >> n;
  vector<long long> v(n);
  for (long long i = 0; i < n; ++i) cin >> v[i];
  for (long long i = 1; i < n; ++i) {
    if (v[i] == v[i - 1]) return false;
    if (y == 1 && abs(v[i] - v[i - 1]) != 1) {
      y = abs(v[i] - v[i - 1]);
    }
  }
  for (long long i = 1; i < n; ++i) {
    if (abs(v[i] - v[i - 1]) == 1 && y != 1) {
      if ((v[i] - 1) / y != (v[i - 1] - 1) / y) {
        return false;
      }
      continue;
    }
    if (y != abs(v[i] - v[i - 1])) {
      return false;
    }
  }
  cout << "YES"
       << "\n";
  cout << maxn << " " << y << "\n";
  return true;
}
int main() {
  ios_base ::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long t = 1;
  while (t--) {
    if (solve()) {
    } else {
      cout << "NO"
           << "\n";
    }
  }
  return 0;
}
