#include <bits/stdc++.h>
using namespace std;
int a[200010];
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  bool c = true;
  int maxx = a[0];
  for (int i = 1; i < n; i++) {
    maxx = max(maxx, a[i]);
    if (a[i] == a[i - 1]) {
      cout << "NO";
      return 0;
    }
    if (abs(a[i] - a[i - 1]) != 1) {
      c = false;
    }
  }
  if (c) {
    cout << "YES\n";
    cout << 1 << " " << maxx;
    return 0;
  }
  int y;
  for (int i = 1; i < n; i++) {
    int diff = abs(a[i] - a[i - 1]);
    if (diff > 1) {
      y = abs(a[i] - a[i - 1]);
      break;
    }
  }
  int x = a[0];
  for (int i = 1; i < n; i++) {
    int diff = abs(a[i] - a[i - 1]);
    if (diff == 1) {
      int j1 = a[i] % y;
      if (j1 == 0) j1 = y;
      int j2 = a[i - 1] % y;
      if (j2 == 0) j2 = y;
      int x1 = ((a[i] - j1) / y) + 1;
      int x2 = ((a[i - 1] - j2) / y) + 1;
      if (x1 != x2) {
        cout << "NO";
        return 0;
      } else {
        x = max(x, x1);
      }
    } else if (diff != y) {
      cout << "NO";
      return 0;
    } else {
      int j1 = a[i] % y;
      if (j1 == 0) j1 = y;
      int x1 = ((a[i] - j1) / y) + 1;
      x = max(x, x1);
    }
  }
  cout << "YES\n";
  cout << x << " " << y;
}
