#include <bits/stdc++.h>
double getmin(double x, double y) {
  if (x < y) return x;
  return y;
}
double getmax(double x, double y) {
  if (x > y) return x;
  return y;
}
int main() {
  int n, cur, i;
  double a, b, high, low;
  low = 10.0;
  high = 1e8;
  a = 1.0;
  b = 0.0;
  cur = 1;
  scanf("%d", &n);
  while (n--) {
    scanf("%d", &i);
    while (i > cur) {
      low = getmax(low, (20.0 - b) / a);
      cur++;
      b -= 10.0;
    }
    high = getmin(high, (20.0 - b) / a);
    a += 1.0;
    b -= 10.0;
    cur++;
  }
  while (a * low + b >= 20.0) {
    low = getmax(low, (20.0 - b) / a);
    cur++;
    b -= 10.0;
  }
  if (a * high + b <= 20.0)
    printf("unique\n%d\n", cur);
  else
    printf("not unique\n");
  return 0;
}
