#include <bits/stdc++.h>
using namespace std;
template <class c>
struct rge {
  c b, e;
};
template <class c>
rge<c> range(c i, c j) {
  return rge<c>{i, j};
}
template <class c>
auto dud(c *x) -> decltype(cerr << *x, 0);
template <class c>
char dud(...);
struct debug {
  ~debug() { cerr << endl; }
  template <class c>
  typename enable_if<sizeof dud<c>(0) != 1, debug &>::type operator<<(c i) {
    cerr << boolalpha << i;
    return *this;
  }
  template <class c>
  typename enable_if<sizeof dud<c>(0) == 1, debug &>::type operator<<(c i) {
    return *this << range(begin(i), end(i));
  }
  template <class c, class b>
  debug &operator<<(pair<b, c> d) {
    return *this << "(" << d.first << ", " << d.second << ")";
  }
  template <class c>
  debug &operator<<(rge<c> d) {
    *this << "[";
    for (auto it = d.b; it != d.e; ++it) *this << ", " + 2 * (it == d.b) << *it;
    return *this << "]";
  }
};
template <typename T>
bool umax(T &a, const T &b) {
  return (a < b ? a = b, 1 : 0);
}
template <typename T>
bool umin(T &a, const T &b) {
  return (a > b ? a = b, 1 : 0);
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  ;
  int n;
  cin >> n;
  vector<int> a(n);
  for (auto &z : a) cin >> z;
  map<int, int> mp;
  for (int i = 1; i < n; i++) {
    mp[abs(a[i] - a[i - 1])]++;
  }
  if ((int)mp.size() > 2 || mp.find(0) != mp.end()) {
    cout << "NO";
    exit(0);
  }
  if ((int)mp.size() == 2 && mp.find(1) == mp.end()) {
    cout << "NO";
    exit(0);
  }
  vector<int> b;
  b.push_back(1);
  for (auto &z : mp) b.push_back(z.first);
  b.erase(unique(b.begin(), b.end()), b.end());
  int x, y;
  y = b.back();
  for (auto &z : a) z--;
  for (int i = 0; i + 1 < n; i++) {
    if (y > 1 && a[i] / y != (a[i + 1] / y) && a[i] % y == 0 &&
        a[i + 1] % y == (y - 1)) {
      cout << "NO";
      exit(0);
    }
    if (y > 1 && a[i] / y != (a[i + 1] / y) && a[i + 1] % y == 0 &&
        a[i] % y == (y - 1)) {
      cout << "NO";
      exit(0);
    }
  }
  cout << "YES" << '\n';
  cout << (int)1e9 << ' ' << y;
  return 0;
}
