#include <bits/stdc++.h>
int main() {
  int n, w = 1, ma;
  scanf("%d", &n);
  int a[n];
  scanf("%d", &a[0]);
  ma = a[0];
  for (int i = 1; i < n; i++) {
    scanf("%d", &a[i]);
    ma = ((ma) > (a[i]) ? (ma) : (a[i]));
    if (a[i] == a[i - 1]) return !printf("NO\n");
    if (((a[i] - a[i - 1]) < 0 ? -(a[i] - a[i - 1]) : (a[i] - a[i - 1])) != 1)
      if (w == 1)
        w = ((a[i - 1] - a[i]) < 0 ? -(a[i - 1] - a[i]) : (a[i - 1] - a[i]));
      else if (w !=
               ((a[i] - a[i - 1]) < 0 ? -(a[i] - a[i - 1]) : (a[i] - a[i - 1])))
        return !printf("NO\n");
  }
  for (int i = 1; i < n; i++) {
    int x = ((a[i] - a[i - 1]) < 0 ? -(a[i] - a[i - 1]) : (a[i] - a[i - 1]));
    if (x != 1 && x != w ||
        w != 1 && x == 1 &&
            ((a[i - 1]) < (a[i]) ? (a[i - 1]) : (a[i])) % w == 0)
      return !printf("NO\n");
  }
  printf("YES\n%d %d\n", ma / w + ma % w, w);
  return 0;
}
