#include<bits/stdc++.h>

using namespace std;

int p[1000001]={0},prime[1000001]={0};

int main()
{
    int n;
    cin>>n;
    int a[n],hcf=0,setwiseprime=0;
    for(int i=0;i<n;i++)
    {
        cin>>a[i];
        hcf=__gcd(a[i],hcf);
        p[a[i]]++;
        if(p[a[i]]>1)setwiseprime=1; 
    }
    if(hcf!=1) cout<<"not coprime";
    else if(setwiseprime&(hcf==1)) cout<<"setwise coprime";
    else
    {
        for(int i=2,count=0;i<1000001;i++,count=0)
        {
            if(prime[i]) continue;
            for(int j=i;j<1000001;j+=i)
            {
                if(p[j]) count++;
                prime[j]++;
            }
            if(count>1) setwiseprime=1;
        }
        if(setwiseprime) cout<<"setwise coprime";
        else cout<<"pairwise coprime";
    }
}