#include<bits/stdc++.h>
using namespace std;
int n,s[1000003],t[1000003],tmp,x;
long long prime[1100000],tot,d[1100003];
void find()
{
    for (long long i=2;i<=1100000;i++)
    {
        if (d[i]==0)
        {
            prime[++tot]=i;
            d[i]=i;
        }
        for (long long j=1;j<=tot&&prime[j]<=d[i];j++)
        {
            if (prime[j]*i<=1100000)d[prime[j]*i]=prime[j];else break;
        }
    }
}
int main()
{
    find();
    scanf("%d",&n);
    scanf("%d",&tmp);
    s[tmp]++;
    x=tmp;
    for (int i=2;i<=n;++i)
    {
        scanf("%d",&tmp);
        x=__gcd(tmp,x);
        s[tmp]++;
    }
    if(x!=1)
    {
        printf("not coprime\n");
        return 0;
    }
    for(int i=2;i<=1000000;++i)
    {
        if(s[i]==0)continue;
        if(s[i]>1)
        {
            printf("setwise coprime\n");
            return 0;
        }
        for (int j=1;prime[j]*prime[j]<=i;++j)
        {
            if(i%prime[j]==0)
            {
                t[prime[j]]++;
                if(t[prime[j]]>1)
                {
                    printf("setwise coprime\n");
                    return 0;
                }
            }
        }
    }
    printf("pairwise coprime\n");
    return 0;
}
