#include<bits/stdc++.h>
using namespace std;
unordered_map<long long,long long> key;
long long flag=0,flag1=0;
void fact(long long n)
{
    long long i;
    if(n<=3&&n>1)
    {
        if(key[n])
        {
            flag=1;
            return;
        }
        else
            key[n]++;
    }
    for(i=2;i<=sqrt(n);i++)
        if(n%i==0)
        {
            if(key[i]||key[n/i])
            {
                flag=1;
                return;
            }
            else
            {
                key[i]++;
                key[n/i]++;
            }
        }
    flag1++;
    return;
}
int main()
{
    long long n,i,j,k,mod=1e9+7;
    cin>>n;
    vector<long long> a(n);
    for(auto &x:a)
        cin>>x;
    for(auto x:a)
    {
        fact(x);
        if(flag==1)
            break;
    }
    if(n==2)
    {
        if(__gcd(a[0],a[1])==1)
            cout<<"pairwise coprime\n";
        else
            cout<<"not coprime\n";
    }
    else
    {
        if(flag==0)
            cout<<"pairwise coprime\n";
        else
        {
            k=*min_element(a.begin(),a.end());
            j=__gcd(a[0],a[1]);
            for(i=2;i<n;i++)
            {
                if(j==1)
                    break;
                else
                    j=__gcd(j,a[i]);
            }
            if(j==1)
                cout<<"setwise coprime\n";
            else
                cout<<"not coprime\n";
        }
    }
    return 0;
}
