#include <bits/stdc++.h>
using namespace std;
set<int> sett;
vector<int> diffs;
int a[200010];
pair<int, int> pos[200010];
int main() {
  int n, i;
  scanf("%d", &n);
  for (i = 0; i < n; i++) scanf("%d", &a[i]);
  if (n == 1) return 0 * printf("YES\n1000000000 1000000000\n");
  for (i = 1; i < n; i++) sett.insert(abs(a[i] - a[i - 1]));
  if (sett.size() > 2) return 0 * printf("NO\n");
  for (auto diff : sett) diffs.push_back(diff);
  if (diffs[0] == 0) return 0 * printf("NO\n");
  if (diffs[0] != 1 && (int)diffs.size() == 2) return 0 * printf("NO\n");
  if (diffs[0] == 1 && (int)diffs.size() == 1)
    return 0 * printf("YES\n1000000000 1000000000\n");
  int y;
  if ((int)diffs.size() == 2)
    y = diffs[1];
  else
    y = diffs[0];
  for (i = 0; i < n; i++) {
    pos[i].first = (a[i] - 1) / y + 1;
    pos[i].second = (a[i] - 1) % y + 1;
  }
  for (i = 1; i < n; i++) {
    if (!(abs(pos[i - 1].first - pos[i].first) == 1 &&
              abs(pos[i - 1].second - pos[i].second) == 0 ||
          abs(pos[i - 1].first - pos[i].first) == 0 &&
              abs(pos[i - 1].second - pos[i].second) == 1))
      break;
  }
  if (i < n) return 0 * printf("NO\n");
  printf("YES\n1000000000 %d\n", y);
}
