#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
#define oo 0x3f3f3f3f

int main()
{
    ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
    vector<int>spf(1e6+1);
    for(int i=0; i<spf.size(); i++)
        spf[i]=i;

    for(int i=2; i<spf.size(); i++)
        if(spf[i]==i)
        for(int j=2*i; j<spf.size(); j+=i)
        if(spf[j]==j)spf[j]=i;

    vector<set<int>>f(1e6+1);
    int gcd = 0;

    int n;
    cin>>n;
    vector<int>A(n);
    int idx = 0;
    for(int&x:A)
    {
        cin>>x;
        gcd = __gcd(gcd,x);
        while( x > 1)
        {
            f[spf[x]].insert(idx);
            x/=spf[x];
        }
        idx++;
    }

    bool pairwise = true;
    for(auto&st : f)pairwise&= st.size() <= 1;

    if(pairwise)return cout<<"pairwise coprime\n",0;
    if(gcd == 1)return cout<<"setwise coprime\n",0;
    cout<<"not coprime";
}
