#include <bits/stdc++.h>
using namespace std;
int n, c, mx;
int a[200010];
int main() {
  scanf("%d", &n);
  int flag = 1;
  for (int i = 1; i <= n; ++i) {
    scanf("%d", &a[i]);
    if (a[i] > mx) mx = a[i];
    if (a[i] == a[i - 1]) flag = 0;
    if (i > 1 && abs(a[i] - a[i - 1]) > 1) {
      if (!c)
        c = abs(a[i] - a[i - 1]);
      else if (c != abs(a[i] - a[i - 1]))
        flag = 0;
    }
  }
  if (!flag) {
    puts("NO");
  } else if (!c) {
    puts("YES");
    printf("1 %d\n", mx);
  } else {
    int lft = 1;
    while (flag && lft < n) {
      int now = lft, g1 = a[now], g2 = a[now];
      while (lft < n && abs(a[lft + 1] - a[lft]) == 1) {
        g1 = max(g1, a[++lft]);
        g2 = min(g2, a[lft]);
      }
      if ((g1 - 1) / c != (g2 - 1) / c) flag = 0;
      while (lft < n && abs(a[lft + 1] - a[lft]) > 1) {
        ++lft;
      }
    }
    if (!flag)
      puts("NO");
    else {
      puts("YES");
      printf("1000000000 %d\n", c);
    }
  }
  return 0;
}
