#include <bits/stdc++.h>
using namespace std;
const int N = 1000001;
const int NN = 1001;
const long double eps = 0.00000001;
int a[NN];
int main() {
  ios_base::sync_with_stdio(0);
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  long double l = 1.0;
  long double r = a[0] + 1 - eps;
  long double mina;
  while (r - l > eps) {
    long double mid = 1.0 * (r + l) / 2;
    int f = 0;
    long double cur = mid;
    for (int i = 0; i < n; i++) {
      if (!i) {
        if (int(cur) < a[i]) {
          f = 2;
          break;
        }
        if (int(cur) > a[i]) {
          f = 1;
          break;
        }
        cur -= a[i];
        cur += mid;
      } else {
        if (int(cur) < a[i] - a[i - 1]) {
          f = 2;
          break;
        }
        if (int(cur) > a[i] - a[i - 1]) {
          f = 1;
          break;
        }
        cur -= (a[i] - a[i - 1]);
        cur += mid;
      }
    }
    if (f == 0) {
      mina = mid;
      r = mid;
    }
    if (f == 1) {
      r = mid;
    }
    if (f == 2) {
      l = mid;
    }
  }
  l = max((long double)0, mina - 0.2);
  r = a[0] + 1 - eps;
  long double maxa;
  while (r - l > eps) {
    long double mid = 1.0 * (r + l) / 2;
    int f = 0;
    long double cur = mid;
    for (int i = 0; i < n; i++) {
      if (!i) {
        if (int(cur) < a[i]) {
          f = 2;
          break;
        }
        if (int(cur) > a[i]) {
          f = 1;
          break;
        }
        cur -= a[i];
        cur += mid;
      } else {
        if (int(cur) < a[i] - a[i - 1]) {
          f = 2;
          break;
        }
        if (int(cur) > a[i] - a[i - 1]) {
          f = 1;
          break;
        }
        cur -= (a[i] - a[i - 1]);
        cur += mid;
      }
    }
    if (f == 0) {
      maxa = mid;
      l = mid;
    }
    if (f == 1) {
      r = mid;
    }
    if (f == 2) {
      l = mid;
    }
  }
  long double minc = mina;
  long double maxc = maxa;
  for (int i = 0; i < n; i++) {
    minc -= int(minc);
    minc += mina;
    maxc -= int(maxc);
    maxc += maxa;
  }
  if (int(minc) == int(maxc)) {
    cout << "unique" << endl << int(minc) + a[n - 1];
  } else {
    cout << "not unique";
  }
}
