#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
const long long int INF = 9e18 + 2e17;
const int inf = 1e9;
const int N = 2e5 + 22;
const double eps = 1e-10;
int a[N];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n;
  cin >> n;
  int x = -1, y = -1;
  for (int i = (int)0; i < (int)n; i++) cin >> a[i];
  int mn = *min_element(a, a + n), mx = *max_element(a, a + n);
  if (mn < 1) {
    cout << "NO";
    return 0;
  }
  bool flag = 1;
  for (int i = (int)1; i < (int)n; i++) {
    int t = abs(a[i] - a[i - 1]);
    if (t == 1) continue;
    if (t == 0) {
      cout << "NO";
      return 0;
    }
    if (flag)
      y = t, flag = 0;
    else if (t != y) {
      cout << "NO";
      return 0;
    }
  }
  if (y != -1) {
    for (int i = (int)1; i < (int)n; i++) {
      if (abs(a[i] - a[i - 1]) == 1 && min(a[i], a[i - 1]) % y == 0) {
        cout << "NO";
        return 0;
      }
    }
  } else {
    y = mx;
  }
  x = mx / y + 1;
  cout << "YES\n";
  cout << x << ' ' << y;
  return 0;
}
