#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef vector<ll> vint;
typedef vector< vector<ll> > vvint;

#define rep(i,n) for(ll i=0;i<n;i++)
#define repf(i,f,n) for(ll i=f;i<n;i++)
#define repr(i,n) for(ll i=n-1;i>=0;i--)
#define mp make_pair
#define mt make_tuple
#define ALL(obj) (obj).begin(), (obj).end()
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }

int dy[]={0, 0, 1, -1, 1, -1, -1, 1};
int dx[]={1, -1, 0, 0, 1, 1, -1, -1};

vector< bool > prime_table(int n) {
  vector< bool > prime(n + 1, true);
  if(n >= 0) prime[0] = false;
  if(n >= 1) prime[1] = false;
  for(int i = 2; i * i <= n; i++) {
    if(!prime[i]) continue;
    for(int j = i + i; j <= n; j += i) {
      prime[j] = false;
    }
  }
  return prime;
}


int main() {
    cout<<fixed<<setprecision(10);

    ll n; cin>>n;
    vint a(n); rep(i,n) cin>>a[i];

    auto pt = prime_table(1000000+100);

    vint cnt(1000000+100, 0);
    for(auto e:a) cnt[e]++;

    bool f = false;

    repf(x, 2, 1000000+100){
        if(!pt[x]) continue;
        ll i = 1;
        ll tmp = 0;
        while(x*i < 1000000+100){
            if(tmp > 0 and cnt[x*i] > 0) {
                f = true;
                break;
            }
            tmp += cnt[x*i];
            i++;
        }

        if(f) break;
    }

    if(f){
        ll g = a[0];
        repf(i,1,n) g = gcd(g, a[i]);
        if(g == 1) puts("setwise coprime");
        else puts("not coprime");

    }else{
        puts("pairwise coprime");
    }


    return 0;

}