#include<bits/stdc++.h>
#define int long long
using namespace std;
constexpr int mod=1e9+7;
int a[1000000];
signed main(){
    int n;
    cin>>n;
    for(int i=0;i<n;i++)
        cin>>a[i];
    int tmp=0;
    for(int i=0;i<n;i++)
        tmp=gcd(tmp,a[i]);
    if(tmp!=1){
        cout<<"not coprime"<<endl;
        return 0;
    }
    set<int>divs;
    for(int i=0;i<n;i++){
        int aa=a[i];
        for(int j=2;j<=1000;j++){
            if(aa%j==0){
                if(divs.find(j)!=divs.end()){
                    cout<<"setwise coprime"<<endl;
                    return 0;
                }
                divs.insert(aa);
                while(aa%j==0)
                    aa/=j;
            }
        }
        if(aa!=1){
            if(divs.find(aa)!=divs.end()){
                cout<<"setwise coprime"<<endl;
                return 0;
            }
            divs.insert(aa);
        }
    }
    cout<<"pairwise coprime"<<endl;
}