#include <bits/stdc++.h>
using namespace std;
struct point {
  int x, y;
  point() {}
  point(int id, int yy) {
    x = id / yy + 1;
    y = id % yy;
    if (y == 0) y = yy, x--;
  }
};
int dist(point a, point b) { return abs(a.x - b.x) + abs(a.y - b.y); }
int a[200010];
int main() {
  int n;
  scanf("%d", &n);
  int mx = 0;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    mx = max(mx, a[i]);
  }
  int y = -1;
  for (int i = 1; i < n; i++) {
    if (abs(a[i + 1] - a[i]) != 1) {
      y = abs(a[i + 1] - a[i]);
      break;
    }
  }
  if (y == -1) return 0 * printf("YES\n%d %d\n", 1, mx);
  if (y == 0) return 0 * printf("NO\n");
  bool flag = true;
  for (int i = 1; i < n; i++) {
    point t1 = point(a[i], y);
    point t2 = point(a[i + 1], y);
    if (dist(t1, t2) > 1) {
      flag = false;
      break;
    }
  }
  if (!flag)
    printf("NO\n");
  else {
    int ansx = point(mx, y).x;
    int ansy = y;
    if (ansx > 1e9 || ansy > 1e9)
      printf("NO\n");
    else {
      printf("YES\n");
      printf("%d %d\n", point(mx, y).x, y);
    }
  }
}
