#include<bits/stdc++.h>
using namespace std;
int a[2000005],b[2000005];
int mx = 1000005,cc=0;
bool vis[2000005];
bool sieve()
{

    int  cnt=0;
    for(int i=2;i<=mx;i+=2)
    {
        if(b[i]==1)
            cnt++;
        vis[i] =true;
    }
    if(cnt>1)
        return false;
    for(int i=3;i<=mx;i++)
    {
        if(vis[i]==false)
        {
            for(int j=i*2;j<=mx;j+=i)
            {
                vis[j]= true;
            }

        }
    }
    a[0] = 2;
    cc++;
    for(int i=3;i<=mx;i+=2)
    {
        if(vis[i]==false)
            a[cc++] = i;
    }
    //cout << cc << endl;
    for(int i=0;i<cc;i++)
    {
        cnt=0;
        for(int j=a[i];j<=mx;j+=a[i])
        {
            if(b[j]==1)
                cnt++;
        }
        if(cnt>1)
            return false;
    }
    return true;
}
int main()
{
    int n;
    cin >> n;
    int gcd=0;
    for(int i=0;i<n;i++)
    {
        int x;
        cin >>  x;
        b[x]=1;
        gcd = __gcd(x,gcd);
    }
    bool ans=sieve();
    if(ans==true)
        cout << "pairwise coprime\n";
    else if(ans==false &&gcd==1)
        cout << "setwise coprime\n";
    else
        cout << "not coprime\n";
}
