#include <bits/stdc++.h>
using namespace std;
void __print(int x) { cerr << x; }
void __print(long x) { cerr << x; }
void __print(long long x) { cerr << x; }
void __print(unsigned x) { cerr << x; }
void __print(unsigned long x) { cerr << x; }
void __print(unsigned long long x) { cerr << x; }
void __print(float x) { cerr << x; }
void __print(double x) { cerr << x; }
void __print(long double x) { cerr << x; }
void __print(char x) { cerr << '\'' << x << '\''; }
void __print(const char *x) { cerr << '\"' << x << '\"'; }
void __print(const string &x) { cerr << '\"' << x << '\"'; }
void __print(bool x) { cerr << (x ? "true" : "false"); }
template <typename T, typename V>
void __print(const pair<T, V> &x) {
  cerr << '{';
  __print(x.first);
  cerr << ',';
  __print(x.second);
  cerr << '}';
}
template <typename T>
void __print(const T &x) {
  int f = 0;
  cerr << '{';
  for (auto &i : x) cerr << (f++ ? "," : ""), __print(i);
  cerr << "}";
}
void _print() { cerr << "]\n"; }
template <typename T, typename... V>
void _print(T t, V... v) {
  __print(t);
  if (sizeof...(v)) cerr << ", ";
  _print(v...);
}
const long long int mod = 1000000007;
long long int gcd(long long int a, long long int b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
long long int binpow(long long int x, long long int y, long long int m) {
  if (y == 0) return 1;
  long long int p = binpow(x, y / 2, m) % m;
  p = (p * p) % m;
  if (y % 2)
    return (x * p) % m;
  else
    return p;
}
long long int modi(long long int a, long long int m) {
  return binpow(a, m - 2, m);
}
const int N = 1000001;
bool seive[N], pres[N];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int i, j, tt = 1;
  while (tt--) {
    long long int n, ones = 0;
    cin >> n;
    set<long long int> s;
    vector<long long int> a(n);
    for (i = 0; i < n; i++) {
      cin >> a[i];
      s.insert(a[i]);
      if (a[i] == 1) ones++;
      pres[a[i]] = 1;
    }
    if (s.size() != n && s.size() + ones - 1 != n) {
      int temp = a[0];
      for (i = 1; i < n; i++) temp = gcd(temp, a[i]);
      if (temp == 1)
        cout << "setwise coprime\n";
      else
        cout << "not coprime\n";
    }
    sort(a.begin(), a.end());
    seive[1] = 1;
    bool coprime = 1;
    for (i = 2; i < N; i++) {
      if (seive[i] == 0) {
        int ct = 0;
        if (pres[i]) ct++;
        for (j = 2 * i; j < N; j += i) {
          seive[j] = 1;
          if (pres[j]) ct++;
        }
        if (ct > 1) coprime = 0;
      }
    }
    if (coprime) {
      cout << "pairwise coprime\n";
      continue;
    }
    long long int temp = a[0];
    for (i = 1; i < n; i++) {
      temp = gcd(temp, a[i]);
    }
    if (temp == 1)
      cout << "setwise coprime\n";
    else
      cout << "not coprime\n";
  }
  return 0;
}
