#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  int a[n], x = 1e9, y = 1e9;
  for (int i = 0; i <= n - 1; i++) cin >> a[i], a[i]--;
  for (int i = 1; i < n; i++) {
    if (a[i] == a[i - 1]) {
      cout << "NO\n";
      return 0;
    } else if (abs(a[i] - a[i - 1]) > 1) {
      y = abs(a[i] - a[i - 1]);
    }
  }
  int r = a[0] / y, c = a[0] % y;
  for (int i = 1; i <= n - 1; i++) {
    if (a[i] / y >= x || abs(a[i] / y - r) + abs(a[i] % y - c) != 1) {
      cout << "NO\n";
      return 0;
    }
    r = a[i] / y;
    c = a[i] % y;
  }
  cout << "YES\n" << x << " " << y << endl;
  return 0;
}
long long choose(long long n, long long k) {
  if (k == 0) return 1;
  return (n * choose(n - 1, k - 1)) / k;
}
bool isprime(long long n) {
  for (long long i = 2; i * i <= n; i++) {
    if (n % i == 0) return false;
  }
  return true;
}
