#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  long long pl, ql, pr, qr, a;
  cin >> a;
  pl = a;
  ql = 1;
  pr = a + 1;
  qr = 1;
  for (int i = 0; i < n - 1; ++i) {
    long long a;
    cin >> a;
    if (a * ql > pl * (i + 2)) {
      pl = a;
      ql = i + 2;
    }
    if ((a + 1) * qr < pr * (i + 2)) {
      pr = a + 1;
      qr = i + 2;
    }
  }
  if ((n + 1) * pl / ql == ((n + 1) * pr - 1) / qr)
    cout << "unique\n" << (n + 1) * pl / ql << '\n';
  else
    cout << "not unique\n";
  return 0;
}
