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

#define ll long long 
#define pb push_back
#define mp make_pair
#define F first
#define S second 
#define pl pair<long long ,long long >
#define pi pair<int ,int >
#define lb(v,x) lower_bound(v.begin(),v.end(),x)-v.begin()
#define ub(v,x) upper_bound(v.begin(),v.end(),x)-v.begin()
#define ct(i) cout<< i << "\n"
#define sv(v) sort(v.begin(),v.end())
#define mod 1000000007
#define M 100005
#define endl "\n"

void solve(){
    ll n,x=0,ans=1;
    //string s,t;
    cin>>n;
    vector<ll> v;
	for(int i=0;i<n;i++){
		cin>>x;
        v.pb(x);
        ans *=x; 
	}
	int f=0;
    for(int i=0;i<n;i++){
        ll tem = ans/v[i];
        if(__gcd(tem,v[i])!=1){
            f=1;
        }
    }
    ans = v[0];
    if(f==0){ cout<<"pairwise coprime"; return; }
    for(int i=1;i<n;i++){
        ans = __gcd(ans,v[i]);
    }
    if(ans==1) cout<<"setwise coprime";
    else cout<<"not coprime";
    
}

int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL); cout.tie(NULL);
    int q;
    //cin>>q; while(q--)
        solve();
    return 0;
}
