#include <bits/stdc++.h>
using namespace std;
const long long MaxN = 301002;
long long n, k;
long long x, y;
long long a[MaxN];
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  for (int i = 1; i < n; i++) {
    if (abs(a[i] - a[i + 1]) > 1 && !y) {
      y = abs(a[i] - a[i + 1]);
    } else if (abs(a[i] - a[i + 1]) > 1 && abs(a[i] - a[i + 1]) != y) {
      cout << "NO\n";
      return 0;
    }
  }
  long long max_el = -MaxN;
  for (int i = 1; i <= n; i++) {
    max_el = max(max_el, a[i]);
    if (a[i] == a[i - 1]) {
      cout << "NO\n";
      return 0;
    }
  }
  y = max(y, 1LL);
  x = 1000000000LL;
  if (y == 1) {
    cout << "YES\n";
    cout << x << " " << y << "\n";
    return 0;
  }
  long long p_x = ((a[1] - 1) / y) + 1, p_y = a[1] - y * ((a[1] - 1) / y);
  p_y = max(p_y, 1LL);
  p_x = max(p_x, 1LL);
  for (int i = 2; i <= n; i++) {
    if (a[i] - a[i - 1] == 1)
      p_y++;
    else if (a[i] - a[i - 1] == -1)
      p_y--;
    else if (a[i] - a[i - 1] == y)
      p_x++;
    else if (a[i] - a[i - 1] == -y)
      p_x--;
    if (p_y <= 0 || p_x <= 0 || p_y > y || p_x > x) {
      cout << "NO\n";
      return 0;
    }
  }
  cout << "YES\n";
  cout << x << " " << y << "\n";
}
