#include <bits/stdc++.h>
using namespace std;
const int maxn = 1000000;
int str[maxn];
int main() {
  int n;
  cin >> n;
  int y = 1;
  for (int i = 0; i < n; i++) {
    cin >> str[i];
    if (i == 0) continue;
    if (str[i] == str[i - 1]) {
      cout << "NO" << endl;
      return 0;
    }
    if (abs(str[i] - str[i - 1]) != 1) y = abs(str[i] - str[i - 1]);
  }
  for (int i = 1; i < n; i++) {
    if (abs(str[i] - str[i - 1]) != 1 && abs(str[i] - str[i - 1]) != y) {
      cout << "NO" << endl;
      return 0;
    }
    if (str[i] % y == 0 && str[i - 1] - str[i] == 1 && y != 1) {
      cout << "NO" << endl;
      return 0;
    } else if (str[i] % y == 1 && str[i] - str[i - 1] == 1 && y != 1) {
      cout << "NO" << endl;
      return 0;
    }
  }
  cout << "YES" << endl;
  cout << 1000000000 << " " << y << endl;
}
