#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
const long long N = 3e5 + 5;
const long long INF = 1e14;
long long a[N];
long long n;
long long check(long long y) {
  long long x = 1000000000;
  for (long long i = 0; i < n - 1; i++) {
    if (a[i + 1] == a[i] + 1) {
      if (a[i] % y == 0) {
        return -1;
      }
    } else if (a[i + 1] == a[i] - 1) {
      if (a[i + 1] % y == 0) {
        return -1;
      }
    } else if (a[i + 1] == a[i] + y) {
      continue;
    } else if (a[i + 1] == a[i] - y) {
      continue;
    } else {
      return -1;
    }
  }
  return x;
}
int main() {
  ios::sync_with_stdio(false);
  cin >> n;
  for (long long i = 0; i < n; i++) cin >> a[i];
  for (long long i = 0; i < n - 1; i++) {
    if (a[i] == a[i + 1]) {
      cout << "NO\n";
      return 0;
    }
  }
  long long y = -1;
  for (long long i = 0; i < n - 1; i++) {
    if (a[i + 1] > a[i] + 1) {
      y = a[i + 1] - a[i];
      break;
    }
  }
  for (long long i = 0; i < n - 1; i++) {
    if (a[i + 1] < a[i] - 1) {
      y = a[i] - a[i + 1];
      break;
    }
  }
  if (y != -1) {
    long long x = check(y);
    if (x == -1) {
      cout << "NO\n";
      return 0;
    }
    cout << "YES\n";
    cout << x << " " << y << "\n";
    return 0;
  }
  cout << "YES\n";
  cout << 1 << " " << 1000000000 << "\n";
  return 0;
}
