#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
ll cnt[1000006];
ll tot[1000006];
int main()
{
    ios_base::sync_with_stdio(NULL);
    cin.tie(NULL);
    cout.tie(NULL);
    int n;
    cin>>n;
    ll gc=0;
    int chk=0;
    for(int i=0; i<n; i++)
    {
        ll x;
        cin>>x;
        gc=__gcd(gc,x);
        cnt[x]++;
    }
    for(int i=2; i<=1e3; i++)
    {
        for(int j=i; j<=1e6; j+=i)
        {
            tot[i] += cnt[j];
        }
    }
    for(int i=2; i<=1e6; i++)
    {
        if(tot[i]>1 || cnt[i]>1)
        {
            chk=1;
        }
    }
    if(chk==0)
    {
        cout<<"pairwise coprime\n";
    }
    else
    {
        if(gc==1)
        {
            cout<<"setwise coprime\n";
        }
        else
            cout<<"not coprime\n";
    }
    return 0;
}
