#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<long long> nums(n);
  int x = 1e9, y = 1;
  for (int i = 0; i < n; i++) {
    cin >> nums[i];
    if (i) y = max(y, (int)abs(nums[i] - nums[i - 1]));
  }
  int j = (nums[0] - 1) % y + 1, i = (nums[0] - 1) / y + 1;
  int cur = nums[0];
  int pos = true;
  for (int k = 1; k < n; k++) {
    if (nums[k] == cur + y)
      i++;
    else if (nums[k] == cur - y)
      i--;
    else if (nums[k] == cur - 1)
      j--;
    else if (nums[k] == cur + 1)
      j++;
    else
      pos = false;
    if (i < 1 || j < 1 || j > y) pos = false;
    cur = nums[k];
  }
  if (!pos)
    cout << "NO" << endl;
  else
    cout << "YES" << endl << x << " " << y << endl;
  return 0;
}
