 #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define  fi0 for(ll i=0;i<n;i++)
ll m=1e6+5;
ll d[1000005]={0};
bool ab=false;
void f(ll n)
{
    for(ll i=2;i*i<=n;i++){
    if(n%i==0){
        if(d[i]==0)
            d[i]++;
        else ab=true;
        if(i!=(n/i)){
            if(d[n/i]==0)
            d[n/i]++;
            else ab=true;
        }
        }
    }
}
int main()
{
   ll n;
///   cout<<m<<endl;
   cin>>n;
   ll a[n];
   cin>>a[0];
   ll gcd=a[0];
   f(a[0]);
   for(ll i=1;i<n;i++){
    cin>>a[i];
    if(!ab)
        f(a[i]);
    gcd=__gcd(gcd,a[i]);
   }
   if(!ab)cout<<"pairwise coprime\n";
   else if(gcd==1)cout<<"setwise coprime\n";
   else cout<<"no coprime\n";
}
