#include <bits/stdc++.h>
using namespace std;
#define data_type long long
#define endl "\n"
vector<data_type> prime;
bitset<100000>mark;
inline void sieve( data_type n)
{
    mark[0]=mark[1]=1;
    data_type i,j,limit=sqrt(n*1.0)+2;
    prime.emplace_back(2);
    for(i=4; i<=n; i+=2)
        mark[i]=1;
    for(i=3; i<=n; i+=2)
        {
            if(!mark[i])
                {
                    prime.emplace_back(i);
                    if(i<=limit)
                        {
                            for(j=i*i; j<=n; j+=i*2)
                                mark[j]=1;
                        }
                }
        }
}
int main()
{

    sieve(1050);
    data_type n,a,sum=0,i,j;
    vector<data_type>dcount(1000007),vc;
    bitset<1000007>mark;
    cin>>n;
    for(int i=0; i<n; i++)
        cin>>a,vc.push_back(a),dcount[a]++;
    for(int i=0; prime[i]*prime[i]<=1000000; i++)
        {
            sum=0;
            for(int j=prime[i]; j<=1000000; j+=prime[i])
                sum+=dcount[j];
            if(sum>1)
                break;
        }

    if(sum<=1)
        return cout<<"pairwise coprime"<<endl,0;
    data_type g=vc[0];
    for(int i=1; i<n; i++)
        g=__gcd(g,vc[i]);
    if(g==1)
        return cout<<"setwise coprime"<<endl,0;
    cout<<"not coprime"<<endl;

    return 0;

}

