#include <bits/stdc++.h>
using namespace std;
int nsize = 0;
vector<int> num;
int left = 0, right = 0, up = 0, down = 0;
int maxleft = 0, maxright = 0, maxup = 0, maxdown = 0;
int curcol = -1;
int max(int a, int b) {
  if (a < b) return b;
  return a;
}
int main() {
  scanf("%d", &nsize);
  int maxnum = 0;
  int i = 0;
  while (i < nsize) {
    int number = 0;
    scanf("%d", &number);
    num.push_back(number);
    maxnum = max(maxnum, number);
    i++;
  }
  i = 1;
  while (i < nsize) {
    if (num[i] == num[i - 1] - 1) {
    } else if (num[i] == num[i - 1] + 1) {
    } else {
      if (num[i] < num[i - 1]) {
        if (curcol == -1) {
          curcol = num[i - 1] - num[i];
        } else {
          if (curcol != num[i - 1] - num[i]) {
            printf("NO\n");
            break;
          }
        }
      } else if (num[i] > num[i - 1]) {
        if (curcol == -1) {
          curcol = num[i] - num[i - 1];
        } else {
          if (curcol != num[i] - num[i - 1]) {
            printf("NO\n");
            break;
          }
        }
      } else {
        printf("NO\n");
        break;
      }
    }
    i++;
  }
  if (i == nsize) {
    if (curcol == -1) {
      printf("YES\n");
      printf("1 % d\n", maxnum);
    } else {
      i = 0;
      while (i < nsize - 1) {
        if (num[i] - 1 == num[i + 1] && num[i] % curcol == 1) break;
        if (num[i] + 1 == num[i + 1] && num[i] % curcol == 0) break;
        i++;
      }
      if (i != nsize - 1) {
        printf("NO\n");
      } else {
        printf("YES\n");
        int temp = maxnum / curcol;
        if (maxnum % curcol) temp++;
        printf("%d %d\n", temp, curcol);
      }
    }
  }
  return 0;
}
