#include <bits/stdc++.h>
using namespace std;
int n, a[200001], dis;
int main() {
  scanf("%d", &n);
  if (n == 1) {
    puts("YES\n1000000000 1");
    return 0;
  }
  for (int i = 1; i <= n; ++i) {
    scanf("%d", a + i);
    if (i == 1) continue;
    if (a[i] == a[i - 1]) {
      puts("NO");
      return 0;
    }
    if (abs(a[i] - a[i - 1]) != 1) {
      if (!dis)
        dis = abs(a[i] - a[i - 1]);
      else if (abs(a[i] - a[i - 1]) != dis) {
        puts("NO");
        return 0;
      }
    }
  }
  if (!dis) {
    puts("YES\n1000000000 1");
    return 0;
  }
  for (int i = 2; i <= n; ++i)
    if (abs(a[i] - a[i - 1]) != dis &&
        (abs(a[i] - a[i - 1]) != 1 || max(a[i], a[i - 1]) % dis == 1)) {
      puts("NO");
      return 0;
    }
  puts("YES");
  printf("1000000000 %d", dis);
}
