#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int from = 0, to = INT_MAX;
  for (int i = 1; i <= n; i++) {
    int p;
    cin >> p;
    from = max(from, p * (n + 1) / i);
    to = min(to, ((p + 1) * (n + 1) - 1) / i);
  }
  if (from != to)
    cout << "not unique" << endl;
  else
    cout << "unique" << endl << from << endl;
  return 0;
}
