#include <bits/stdc++.h>
#define ll long long
#define fr(i,n) for(ll i=0;i<n;i++)
using namespace std;
ll k[1000005];ll n;
bool pairwise(){
for(ll i=0;i<n;i++){
    for(ll ii=i+1;ii<n;ii++)
        {if(__gcd(k[i],k[ii])!=1)return false;}
}
return true;}

bool setwise(){
    ll gcd=k[0];
for(ll i=1;i<n;i++){
        gcd=__gcd(k[i],gcd);
        {if(gcd==1)return true;}
}
return false;}


int main() {
    cin>>n;
    fr(i,n)cin>>k[i];
   if(pairwise())cout<<"pairwise coprime";
    else if(setwise())cout<<"setwise coprime";
    else  cout<<"not coprime";

    }
