#include <bits/stdc++.h>
using namespace std;
const int INF = (1e9) + 10;
int main() {
  int n, m = INF;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i != n; ++i) {
    cin >> a[i];
  }
  for (int i = 0; i < n - 1; ++i) {
    if (abs(a[i] - a[i + 1]) == 0) {
      cout << "NO\n";
      return 0;
    }
    if (abs(a[i] - a[i + 1]) > 1) {
      if (m == INF) {
        m = abs(a[i] - a[i + 1]);
      }
      if (m != abs(a[i] - a[i + 1])) {
        cout << "NO\n";
        return 0;
      }
    }
  }
  if (m == INF) {
    cout << "YES\n" << *max_element(begin(a), end(a)) << " 1\n";
    return 0;
  }
  int x = (a[0] - 1) % m;
  int y = (a[0] - 1) / m;
  for (int i = 1; i != n; ++i) {
    int newX = (a[i] - 1) % m;
    int newY = (a[i] - 1) / m;
    if (abs(x - newX) + abs(y - newY) != 1) {
      cout << "NO\n";
      return 0;
    }
    x = newX;
    y = newY;
  }
  cout << "YES\n"
       << (*max_element(begin(a), end(a)) - 1) / m + 1 << ' ' << m << '\n';
  return 0;
}
