#include <bits/stdc++.h>
using namespace std;
int a[200010], xa[200010], ya[200010];
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  for (int i = 1; i < n; i++)
    if (a[i] == a[i + 1]) {
      cout << "NO" << endl;
      return 0;
    }
  int y = -1;
  for (int i = 1; i < n; i++) {
    if (a[i] == a[i + 1] - 1 || a[i] == a[i + 1] + 1)
      continue;
    else {
      int w = fabs(a[i] - a[i + 1]);
      if (y == w) continue;
      if (y == -1)
        y = w;
      else {
        cout << "NO" << endl;
        return 0;
      }
    }
  }
  if (y == -1) {
    cout << "YES" << endl;
    cout << 1000000000 << " " << 1000000000 << endl;
    return 0;
  }
  for (int i = 1; i <= n; i++) {
    if (a[i] % y == 0)
      xa[i] = a[i] / y;
    else
      xa[i] = a[i] / y + 1;
    ya[i] = a[i] % y;
    if (ya[i] == 0) ya[i] = y;
  }
  for (int i = 1; i < n; i++) {
    int w = fabs(a[i] - a[i + 1]);
    if (w == y) continue;
    int xb = fabs(xa[i] - xa[i + 1]), yb = fabs(ya[i] - ya[i + 1]);
    if ((xb == 1 && yb == 0) || (yb == 1 && xb == 0)) continue;
    cout << "NO" << endl;
    return 0;
  }
  cout << "YES" << endl;
  cout << 1000000000 << " " << y << endl;
  return 0;
}
