#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e6 + 7;
int main() {
  int k;
  cin >> k;
  if (k == 1) {
    cout << "YES" << endl;
    int tem;
    cin >> tem;
    cout << 1 << " " << tem << endl;
    return 0;
  }
  vector<long long> m;
  vector<long long> nums;
  for (int i = 0; i < k; ++i) {
    long long tem;
    cin >> tem;
    nums.push_back(tem);
  }
  for (int i = 1; i < k; ++i) {
    long long tem = nums[i] - nums[i - 1];
    if (abs(tem) != 1) {
      m.push_back(abs(tem));
    }
  }
  sort(m.begin(), m.end());
  m.erase(unique(m.begin(), m.end()), m.end());
  if (m.size() == 0) {
    cout << "YES" << endl;
    sort(nums.begin(), nums.end());
    cout << 1 << " " << nums[nums.size() - 1] << endl;
    return 0;
  }
  if (m.size() != 1) {
    cout << "NO" << endl;
    return 0;
  }
  long long gap = m[0];
  if (gap == 0) {
    cout << "NO" << endl;
    return 0;
  }
  for (int i = 0; i < k - 1; ++i) {
    if ((nums[i] - 1) / gap != (nums[i + 1] - 1) / gap) {
      if (abs(nums[i] - nums[i + 1]) != gap) {
        cout << "NO" << endl;
        return 0;
      }
    } else {
      if (abs(nums[i] - nums[i + 1]) != 1) {
        cout << "NO" << endl;
      }
    }
  }
  sort(nums.begin(), nums.end());
  long long n = nums[nums.size() - 1] / gap;
  if (nums[nums.size() - 1] % gap != 0) n += 1;
  cout << "YES" << endl;
  cout << n << " " << gap << endl;
}
