#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  int arr[n];
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
  }
  int diff = 1;
  for (int i = 1; i < n; i++) {
    if (abs(arr[i] - arr[i - 1]) == 1)
      continue;
    else if (abs(arr[i] - arr[i - 1]) == diff)
      continue;
    else if (diff == 1) {
      diff = abs(arr[i] - arr[i - 1]);
      continue;
    } else {
      cout << "NO"
           << "\n";
      return 0;
      break;
    }
  }
  int y = diff;
  if (diff == 0) {
    cout << "NO"
         << "\n";
    return 0;
  }
  int f = 0;
  for (int i = 0; i < n - 1; i++) {
    int x = arr[i];
    if (x % y == 1) {
      if (arr[i + 1] == arr[i] - y || arr[i + 1] == arr[i] + 1 ||
          arr[i + 1] == arr[i] + y)
        continue;
      f = 1;
      break;
    } else if (x % y == 0) {
      if (arr[i + 1] == arr[i] - y || arr[i + 1] == arr[i] - 1 ||
          arr[i + 1] == arr[i] + y)
        continue;
      f = 1;
      break;
    } else {
      if (arr[i + 1] == arr[i] - y || arr[i + 1] == arr[i] + 1 ||
          arr[i + 1] == arr[i] + y || arr[i + 1] == arr[i] - 1)
        continue;
      f = 1;
      break;
    }
  }
  if (f) {
    cout << "NO"
         << "\n";
  } else {
    cout << "YES"
         << "\n";
    cout << 1000000000 << " " << y << "\n";
  }
}
