#include <bits/stdc++.h>
using namespace std;
void kill() {
  cout << "NO";
  exit(0);
}
int col = -1, ma = 1e9;
vector<int> v;
bool check(int i, int j) {
  int row, tc;
  row = v[i] / col;
  if (v[i] % col != 0) row++;
  tc = v[i] % col;
  if (tc == 0) tc = col;
  int row2, tc2;
  row2 = v[j] / col;
  if (v[j] % col != 0) row2++;
  tc2 = v[j] % col;
  if (tc2 == 0) tc2 = col;
  if (row + 1 <= ma && row + 1 == row2 && tc == tc2) return 1;
  if (row == row2 && tc + 1 == tc2 && tc + 1 <= col) return 1;
  if (row - 1 == row2 && tc == tc2 && row - 1 >= 1) return 1;
  if (row == row2 && tc - 1 == tc2 && tc - 1 >= 1) return 1;
  return 0;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin >> n;
  v.resize(n + 5);
  for (int i = 0; i < n; i++) cin >> v[i];
  for (int i = 0; i < n; i++) {
    if (i) {
      int a = v[i] - v[i - 1];
      if (a == 0) kill();
      if (a < 0) a *= -1;
      if (a != 1) {
        if (col == -1) col = a;
        if (col != a) kill();
      }
    }
  }
  if (col == -1) {
    cout << "YES" << endl;
    int x = 1e9;
    cout << x << " " << x << endl;
    return 0;
  }
  for (int i = 0; i < n; i++) {
    int row, tc;
    row = v[i] / col;
    if (v[i] % col != 0) row++;
    tc = v[i] % col;
    if (tc == 0) tc = col;
    if (i) {
      if (!check(i - 1, i)) kill();
    }
  }
  int x = 1e9;
  cout << "YES" << endl;
  cout << x << " " << col;
  return 0;
}
