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