#include <bits/stdc++.h>
using namespace std;
template <typename T>
void gmin(T &a, T b) {
  a = a < b ? a : b;
}
template <typename T>
void gmax(T &a, T b) {
  a = a > b ? a : b;
}
int n, ans, x, y, mx;
int a[200010];
map<int, int> mp;
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]), gmax(mx, a[i]);
  for (int i = 2; i <= n; i++) {
    int tmp = abs(a[i] - a[i - 1]);
    if (tmp != 1) mp[tmp] = 1;
  }
  if (mp.size() > 1) return puts("NO"), 0;
  if (mp.size() == 0) return printf("YES\n%d %d\n", 1, mx), 0;
  y = mp.begin()->first;
  if (!y) return printf("NO\n"), 0;
  for (int i = 2; i <= n; i++) {
    int tmp = a[i] - a[i - 1];
    if (tmp == 1) {
      if (a[i] % y == 1) return puts("NO"), 0;
    } else if (tmp == -1) {
      if (a[i] % y == 0) return puts("NO"), 0;
    }
  }
  x = mx / y + 1;
  printf("YES\n%d %d\n", x, y);
  return 0;
}
