#include <bits/stdc++.h>
using namespace std;
int n, a[200010], y = 1;
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) scanf("%d", &a[i]);
  for (int i = 2; i <= n; ++i) y = max(y, abs(a[i] - a[i - 1]));
  for (int i = 2; i <= n; ++i) {
    if (y != 1 && (abs(a[i] - a[i - 1]) == 1)) {
      if ((a[i - 1] - 1) / y != (a[i] - 1) / y) puts("NO"), exit(0);
    } else if (abs(a[i] - a[i - 1]) != y)
      puts("NO"), exit(0);
  }
  cout << "YES" << endl << 1000000000 << ' ' << y << endl;
  return 0;
}
