#include <bits/stdc++.h>
template <class T>
T Min(const T &a, const T &b) {
  return a < b ? a : b;
}
template <class T>
T Max(const T &a, const T &b) {
  return a > b ? a : b;
}
template <class T>
bool Chkmin(T &a, const T &b) {
  return a > b ? a = b, 1 : 0;
}
template <class T>
bool Chkmax(T &a, const T &b) {
  return a < b ? a = b, 1 : 0;
}
struct fast_input {
  static const int L = 1 << 15 | 1;
  char buf[L], *l, *r;
  void Next(char &c) {
    if (l == r) r = (l = buf) + fread(buf, 1, L, stdin);
    c = l == r ? (char)EOF : *l++;
  }
  template <class T>
  void operator()(T &x) {
    char c, f = 1;
    for (Next(c); c > '9' || c < '0'; Next(c))
      if (c == '-') f = -1;
    for (x = 0; c >= '0' && c <= '9'; Next(c)) x = x * 10 + c - '0';
    x *= f;
  }
  void operator()(char &c, char l = 'a', char r = 'z') {
    do Next(c);
    while (c > r || c < l);
  }
} input;
const int SN = 200000 + 47;
int n, a[SN], x, y;
int main() {
  int u, v, w;
  input(n);
  for (int i = (1), i_end = (n); i <= i_end; ++i) input(a[i]);
  for (int i = (2), i_end = (n); i <= i_end; ++i) {
    if (a[i] - a[i - 1] == -1)
      continue;
    else if (a[i - 1] - a[i] == -1)
      continue;
    else if (a[i - 1] == a[i])
      return puts("NO"), 0;
    else if (a[i] > a[i - 1]) {
      if (!y)
        y = a[i] - a[i - 1];
      else if (y != a[i] - a[i - 1])
        return puts("NO"), 0;
    } else {
      if (!y)
        y = a[i - 1] - a[i];
      else if (y != a[i - 1] - a[i])
        return puts("NO"), 0;
    }
  }
  if (!y) y = 1000000000;
  for (int i = (2), i_end = (n); i <= i_end; ++i) {
    x = Max(a[i] - a[i - 1], a[i - 1] - a[i]);
    if (x == 1 && Min(a[i], a[i - 1]) % y == 0) return puts("NO"), 0;
  }
  printf("YES\n1000000000 %d\n", y);
  return 0;
}
