#include <bits/stdc++.h>
using namespace std;
const int MAX = 2e5 + 5;
int arr[MAX];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%d", &arr[i]);
  int x = -1, y = -1, mx = arr[0];
  for (int i = 0; i < n - 1; i++) {
    mx = max(mx, arr[i + 1]);
    int dif = abs(arr[i] - arr[i + 1]);
    if (dif > 1) {
      if (y == -1)
        y = dif;
      else if (dif != y) {
        puts("NO");
        return 0;
      }
    }
    if (dif == 0) {
      puts("NO");
      return 0;
    }
  }
  if (y == -1) {
    puts("YES");
    printf("1 %d", mx);
    return 0;
  }
  for (int i = 0; i < n - 1; i++) {
    int now = arr[i];
    int nxt = arr[i + 1];
    if (now % y == 0) {
      if (nxt != now + y && nxt != now - y && nxt != now - 1) {
        puts("NO");
        return 0;
      }
    } else if (now % y == 1) {
      if (nxt != now + y && nxt != now - y && nxt != now + 1) {
        puts("NO");
        return 0;
      }
    } else if (nxt != now + 1 && nxt != now - 1 && nxt != now - y &&
               nxt != now + y) {
      puts("NO");
      return 0;
    }
  }
  x = ceil((double)mx / (double)y);
  puts("YES");
  printf("%d %d", x, y);
  return 0;
}
