#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
#define mod 1000000007
#define pb push_back
#define nl cout<<"\n"
#define db(x) cout<<x<<" "
#define fi(a,b) for(int i=a;i<b;i++)
#define fj(a,b) for(int j=a;j<b;j++)
#define fk(a,b) for(int k=a;k<b;k++)
#define F first
#define S second
#define UM unordered_map<int,int>
#define MP map<int,int>
#define mxsize (int)1e6

void fun(){
    int n;
    cin>>n;
    int a[n];
    fi(0,n) cin>>a[i];
    int g=a[0];
    fi(1,n){
        g=__gcd(g,a[i]);
    }
    if(g!=1){
        cout<<"not coprime";
        return ;
    }
    map<int,bool> mp;
    fj(0,n){
        for(ll i=2;i*i<=a[j];i++){
            if(a[i]%i==0){
                if(mp[i]!=0||mp[a[j]/i]!=0){
                    cout<<"setwise coprime";
                    return ;
                }
                mp[i]=1;
                mp[a[i]/i]=1;
            }
        }
    }
    cout<<"pairwise coprime";
}
int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    #ifndef ONLINE_JUDGE
        freopen("/ATOM/input.txt", "r", stdin);
        freopen("/ATOM/output.txt", "w", stdout);
    #endif
    int t=1;
    // cin>>t;
    while(t--){
        fun();
    }
}