#include <bits/stdc++.h>
using namespace std;
template <class T>
inline int countbit(T n) {
  return (n == 0) ? 0 : (1 + countbit(n & (n - 1)));
}
template <class T>
inline T gcd(T a, T b) {
  return b ? gcd(b, a % b) : a;
}
const double EPS = 1e-9;
const double PI = acos(-1.0);
bool EQU(double a, double b) { return fabs(a - b) < 1e-7; }
int main() {
  int i, j, k;
  int N;
  cin >> N;
  vector<int> vec;
  for (i = 0; i < N; i++) {
    cin >> k;
    vec.push_back(k);
  }
  int M = vec[0];
  vector<int> bits;
  for (i = 1; i < vec.size(); i++) {
    if (vec[i] - vec[i - 1] == M)
      bits.push_back(0);
    else
      bits.push_back(1);
  }
  double b, e;
  b = 0.;
  double almost = 10. - 1e-9;
  e = almost;
  double cant = 0.;
  for (i = 0; i < bits.size(); i++) {
    if (bits[i] == 0) {
      e = min(e, (cant + 10.) / (double)(i + 2) - 1e-7);
    } else {
      cant += 10.;
      b = max(b, (cant) / (double)(i + 2));
    }
  }
  int change = 0;
  if (floor((b * (double)N) / 10.) != floor((b * (double)(N + 1)) / 10.))
    change |= 1;
  else
    change |= 2;
  if (floor((e * (double)N) / 10.) != floor((e * (double)(N + 1)) / 10.))
    change |= 1;
  else
    change |= 2;
  if (change == 3) {
    cout << "not unique" << endl;
  } else {
    cout << "unique" << endl;
    int res = M + vec[(int)vec.size() - 1];
    if (change == 1) res++;
    cout << res << endl;
  }
  return 0;
}
