#include <bits/stdc++.h>
using namespace std;
const int MAXN = 2E5 + 10;
const int X = 1E9;
int n, Y;
int a[MAXN];
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  for (int i = 2; i <= n; i++) {
    if (a[i] - a[i - 1] == 0) {
      puts("NO");
      return 0;
    }
    if (abs(a[i] - a[i - 1]) == 1) continue;
    if (Y == 0)
      Y = abs(a[i] - a[i - 1]);
    else if (Y != abs(a[i] - a[i - 1])) {
      puts("NO");
      return 0;
    }
  }
  if (Y == 0)
    Y = 1;
  else
    for (int i = 2; i <= n; i++)
      if (abs(a[i] - a[i - 1]) == 1)
        if (min(a[i], a[i - 1]) % Y == 0) {
          puts("NO");
          return 0;
        }
  puts("YES");
  printf("%d %d", X, Y);
  return 0;
}
