#include <bits/stdc++.h>
using namespace std;
int main() {
  int x;
  while (cin >> x) {
    int n[x + 1];
    n[0] = 0;
    long double a, b, kUP, kD, B;
    a = 1.0;
    b = 1.0;
    kUP = 99999999.0;
    kD = -99999999.0;
    for (int i = 1; i < x + 1; i++) {
      cin >> n[i];
      if (i == 1) {
        B = n[i];
        b = B;
      }
      kUP = min(10 * (n[i] - n[i - 1] - b + 1) / a, kUP);
      kD = max(10 * (n[i] - n[i - 1] - b) / a, kD);
      a = (a + 1);
      b = b + B + n[i - 1] - n[i];
    }
    kUP -= 0.000001;
    kD += 0.000001;
    if (int((kUP * a + 10 * b) / 10) == int((kD * a + 10 * b) / 10) && kUP > kD)
      cout << "unique" << endl << n[x] + int((kD * a + 10 * b) / 10) << endl;
    else
      cout << "not unique" << endl;
  }
  return 0;
}
