#include <bits/stdc++.h>
using namespace std;
int a[1005], c[1005];
int main() {
  int n, i, b;
  double l, r;
  while (scanf("%d", &n) != EOF) {
    b = 0;
    c[0] = 0;
    for (i = 1; i <= n; i++) {
      scanf("%d", &a[i]);
      c[i] = a[i] - b;
      b = a[i];
    }
    double left = -10000000.0;
    double right = 10000000.0;
    for (i = 1; i < n; i++) {
      l = (double)(c[i + 1] * 10 + a[i] * 10) / (i + 1);
      r = (double)((c[i + 1] + 1) * 10 + a[i] * 10) / (i + 1);
      if (l > left) left = l;
      if (r < right) right = r;
    }
    double down = (n + 1) * left - a[n] * 10;
    double up = (n + 1) * right - a[n] * 10;
    int t = a[n] + 1;
    while (down >= 10 * (t - a[n])) t++;
    if (up > 10 * (t - a[n]))
      printf("not unique\n");
    else
      printf("unique\n%d\n", t - 1);
  }
  return 0;
}
