#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, mx = -1;
  cin >> n;
  set<int> s;
  int a[n + 1];
  for (int i = 1; i <= n; ++i) {
    cin >> a[i];
    mx = max(mx, a[i]);
    if (i != 1) s.insert(abs(a[i] - a[i - 1]));
  }
  if (s.size() == 0)
    cout << "YES\n" << mx << " " << mx;
  else if (s.size() == 1 && *s.begin()) {
    cout << "YES\n" << mx << " " << *s.begin();
  } else if (s.size() == 2 && *s.begin() == 1) {
    int no = *s.rbegin();
    for (int i = 2; i <= n; ++i)
      if (abs(a[i] - a[i - 1]) == 1 && (min(a[i], a[i - 1]) % no == 0)) {
        cout << "NO";
        return 0;
      }
    cout << "YES\n" << mx << " " << no;
  } else
    cout << "NO";
}
