#include<bits/stdc++.h>
using namespace std;
#define ll long long int

int main(){
    ll n;
    cin>>n;
    ll a[n];
    for(ll i=0;i<n;i++) cin>>a[i];
    if(n<=1000){
        ll ans=1;
        for(ll i=0;i<n;i++){
            for(ll j=i+1;j<n;j++)   if(__gcd(a[i],a[j])!=1) ans=-1;
        }
        if(ans!=-1){
            cout<<"pairwise coprime"<<endl;
            return 0;
        }
    }
    ll ans=a[0];
    for(ll i=1;i<n;i++) ans=__gcd(ans,a[i]);
    if(ans==1)  cout<<"setwise coprime"<<endl;
    else        cout<<"not coprime"<<endl;
    return 0;
}
