#include <bits/stdc++.h>
using namespace std;
void openFiles() {}
void IOoptimize() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
bool ok(pair<int, int> a, pair<int, int> b) {
  if (a.first == -1) return true;
  return (abs(a.first - b.first) + abs(a.second - b.second)) == 1;
}
int main() {
  IOoptimize();
  openFiles();
  int n;
  cin >> n;
  vector<int> a(n);
  int y = 1;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    a[i]--;
  }
  for (int i = 1; i < n; i++) {
    if (a[i] == a[i - 1]) {
      cout << "NO";
      return 0;
    }
    if (abs(a[i] - a[i - 1]) > 1) {
      y = abs(a[i] - a[i - 1]);
      break;
    }
  }
  pair<int, int> prev = {-1, -1};
  for (int i = 0; i < n; i++) {
    pair<int, int> cur = {a[i] / y, a[i] % y};
    if (!ok(prev, cur)) {
      cout << "NO";
      return 0;
    }
    prev = cur;
  }
  cout << "YES\n";
  cout << "1000000000 " << y << "\n";
  return 0;
}
