#include<bits/stdc++.h>
using namespace std;
int main(){
    typedef long long int ll;
    ll n;
    cin>>n;
    ll a[n];
    map<ll,ll>mp;
    for(int i = 0 ;  i <n ; i++){
        cin>>a[i];
        for(int j = 2 ; j*j <= a[i] ; j++){
            if(a[i]%j == 0){
                mp[j]++;
                if(a[i]/j != j){
                    mp[a[i]/j]++;
                }
            }
        }
    }
    int f = 0;
    for(auto i:mp){
        if(i.second >= 2){
            f = 1;
        }
    }
    if(f == 1){
        ll gc = a[0];
        for(int i = 1 ; i < n ; i++){
            gc = __gcd(a[i],gc);
        }
        if(gc == 1){
            cout<<"setwise coprime"<<endl;
        }
        else{
            cout<<"not coprime"<<endl;
        }
    }
    else{
        cout<<"pairwise coprime"<<endl;
    }
}
