#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  scanf("%d", &n);
  vector<int> v(n);
  for (int i = 0; i < n; ++i) scanf("%d", &v[i]);
  int gas = 1;
  long long min_an = 10, min_ad = 1;
  long long max_an = 1000000000, max_ad = 1;
  for (int x = 1, i = 0; i < n; ++x) {
    const double split = ((x + 1) * 10) / gas;
    if (v[i] == x) {
      if ((x + 1) * 10 * max_ad < max_an * gas)
        max_an = (x + 1) * 10, max_ad = gas;
      ++i, ++gas;
    } else {
      if ((x + 1) * 10 * min_ad > min_an * gas)
        min_an = (x + 1) * 10, min_ad = gas;
    }
  }
  int answer = -1;
  for (int x = v.back() + 1; answer == -1; ++x) {
    if ((x + 1) * 10 * max_ad >= max_an * gas) answer = x;
    if ((x + 1) * 10 * min_ad > min_an * gas) break;
  }
  if (answer == -1)
    printf("%s\n", "not unique");
  else
    printf("%s\n%d\n", "unique", answer);
  return 0;
}
