#include <bits/stdc++.h>
using namespace std;
pair<long long, long long> may(pair<long long, long long> A,
                               pair<long long, long long> B) {
  if (A.first * B.second < B.first * A.second) return B;
  return A;
}
long long mcd(long long a, long long b) {
  long long c;
  while (b) {
    c = b;
    b = a % b;
    a = c;
  }
  return a;
}
int main() {
  int N;
  int arr[1005];
  int i, j;
  int res = 0;
  pair<long long, long long> w, v;
  scanf("%d", &N);
  for (i = 0; i < N; i++) {
    scanf("%d", &arr[i]);
  }
  arr[N] = arr[N - 1] + arr[0];
  w = pair<long long, long long>(1LL, 1LL);
  for (i = 0; i <= N; i++) {
    j = mcd(i + 1, arr[i]);
    w = may(w, pair<long long, long long>(0LL + arr[i] / j, 0LL + (i + 1) / j));
  }
  for (i = 0; i <= N; i++) {
    if (arr[i] != ((i + 1LL) * w.first) / w.second) break;
  }
  if (i > N) res++;
  arr[N] = arr[N - 1] + arr[0] + 1;
  w = pair<long long, long long>(1LL, 1LL);
  for (i = 0; i <= N; i++) {
    j = mcd(i + 1, arr[i]);
    w = may(w, pair<long long, long long>(0LL + arr[i] / j, 0LL + (i + 1) / j));
  }
  for (i = 0; i <= N; i++) {
    if (arr[i] != ((i + 1LL) * w.first) / w.second) break;
  }
  if (i > N) res += 2;
  if (res != 3) {
    printf("unique\n");
    if (res == 1)
      printf("%d\n", arr[N - 1] + arr[0]);
    else
      printf("%d\n", arr[N - 1] + arr[0] + 1);
  } else {
    printf("not unique\n");
  }
  return 0;
}
