#include<bits/stdc++.h>
using namespace std;
#define int long long
#define rapido ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define endl "\n"

int prime[1000005];

void pre()
{
    memset(prime,-1,sizeof(prime));
    prime[0]=0;
    prime[1]=1;
    for(int i=2;i*i<=1000000;i++)
    {
        if(prime[i]==-1)
        {
            for(int j=i;j<=1000000;j+=i)
            {
                if(prime[j]==-1)
                 prime[j]=i;
            }
        }
    }
}
void solve()
{
    int n;cin>>n;
    vector<int>arr(n);
    int g=0;
    set<int>st;
    for(int i=0;i<n;i++)
    {
    cin>>arr[i];
    st.insert(prime[arr[i]]);
    g=__gcd(g,arr[i]);
    }
    if(st.size()==n)
    cout<<"pairwise coprime"<<endl;
    else if(g==1)
    cout<<"setwise coprime"<<endl;
    else
    cout<<"not coprime"<<endl;
    
    
    
    
    
    
}
int32_t main()
{
    pre();
    rapido;
    int t;
    t=1;
    while(t--)
    solve();
}