#include<bits/stdc++.h>
using namespace std;
#define ll  long long
#define endl '\n'
#define FASTINOUT ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
int cnt[(int)1e6+9];
bool b[(int)1e6+9];
bool exist[(int)1e6+9];
int main()
{
    FASTINOUT;
    ll x,g=0;
    cin>>x;
    ll a[x];
    for (int i=0; i<x; i++)
    {
        cin>>a[i];
        exist[a[i]]=1;
        g=__gcd(g,a[i]);
    }
    for (int i=2; i<=1e6; i++)
    {
        if (b[i])
            continue;
        for (int j=i+i; j<=1e6; j+=i)
        {
            if (exist[j]){
                cnt[i]++;
                cnt[j]++;
                b[j]=1;
            }
        }
    }
    int cn=0;
    for (int i=0;i<x;i++){
        if (cnt[a[i]]){
            cn++;
        }
    }
    if (cn<2)
        cout<<"pairwise coprime";
    else if (g==1)
        cout<<"setwise coprime";
    else
        cout<<"not coprime";
    return 0;
}
