#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#pragma GCC optimization("unroll-loops")
#include <bits/stdc++.h>
using namespace std;
 
//krishrawat
 
 
//----------------------------MACROS-------------------------------------------------
#define pb insert//                                                                 |
#define eb emplace_back//                                                           |
#define ff first//                                                                  |
#define ss second//                                                                 |
typedef long long int ll;//                                                         |
typedef long double ld;//                                                           |
#define all(a) a.begin(), a.end()//                                                 |
#define show(x) cerr << #x << " is " << x << "\n"//                                 |
#define show2(x, y) cerr << #x << " " << #y << " " << x << " " << y << "\n"//       |
typedef vector<ll> vl;//                                                            |
typedef vector<vl> vvl;//                                                           |
typedef pair<ll, ll> pp;//                                                          |
typedef vector<pp> vp;//                                                            |
typedef map<pp, ll> ipi;//                                                          |
typedef map<pp, char> ipc;//                                                        |
typedef map<ll, ll> ii;//                                                           |
typedef set<ll> sl;//                                                               |
typedef multiset<ll> msl;//                                                         |
typedef map<char, ll> ci;//                                                         |
typedef set<pair<ll, ll>> sp;//                                                     |
const ll mod = 1e9 + 7;//                                                           |
const ll N = 1e6 + 2;//                                                             |
//----------------------------------------------------------------------------------

ll fast_expo(ll x, ll y){ll res=1;while(y>0){if(y&1){res*=x;}x*=x;y>>=1;}return res;}

vl vis(N,0);

//solution
void solve()
{   
    ll n;cin>>n;
    vl v(n);
    ii m;
    for(auto &i:v) {cin>>i;m[i]++;}
    int f=0;
    ll p=0;
    for(int i=2;i*i<=N;i++){
        if(!vis[i]){
            p++;
            ll cnt=0;
            for(int j=i;j<N;j+=i){
                if(m[j]) cnt+=m[j];
                if(cnt>1) {f=1;break;}
                vis[j]=1;
            }
        }
        if(f) break;
    }
    for(int i=2;i<=1e6;i++) {
        if(m[i]>1){
            f=1;
        }
    }
    
    if(!f) cout<<"pairwise coprime\n";
    else{
        ll gcds=0;
        for(auto i:v){
            gcds=__gcd(gcds,i);
        } 
        if(gcds==1) cout<<"setwise coprime\n";
        else cout<<"not coprime\n";
    }
}
 
int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
    
    ll t; t=1;
    //cin>>t;
    while(t--) solve(); return 0;
}
