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