#include<bits/stdc++.h>
#define int long long
using namespace std;

long long power(long long a, long long b,long long m) {
    long long res = 1;
    while (b > 0) {
        if (b & 1)
            res = res * a %m;
        a = a * a %m;
        b >>= 1;
    }
    return res;
}
int pr[1000005];
vector<int>divi[1000005];
void bin()
{
    for(int i=2;i<=1000000;i++)
    {
        if(pr[i]==0)
        {
            for(int j=i;j<=1000000;j++)
            {
                pr[j]=1;
                divi[j].push_back(i);
            }
        }
    }
}

int mm[1000005];
int ans[1000005];

signed main()
{

ios_base::sync_with_stdio(false);
cin.tie(NULL);  
cout.tie(0);   

#ifndef ONLINE_JUDGE
    if(fopen("INPUT.txt","r"))
    {
    freopen ("INPUT.txt" , "r" , stdin);
    freopen ("OUTPUT.txt" , "w" , stdout);
    }
#endif      

    int n;
    cin>>n;
    int a[n+1];
    bin();
    for(int i=1;i<=n;i++)
    {
        cin>>a[i];
    }
    int g=0;
    bool flag=true;
    for(int i=n;i>=1;i--)
    {
        g=__gcd(a[i],g);
        for(auto j:divi[a[i]])
        {
            // cout<<j<<" ";
            if(mm[j])
                flag=false;
            mm[j]=1;
        }
    }

    if(flag)
    {
        cout<<"pairwise coprime";
    }
    else if(g==1)
    {
        cout<<"setwise coprime";
    }
    else
        cout<<"not coprime";

}