#include<bits/stdc++.h>
#define ll long long
using namespace std;
ll mod=1e9+7;
ll prime[1000001];
void smallestPrime()
{
    for(ll i=1;i<=1000000;i++)
    prime[i]=i;
    for(ll i=4;i<=1000000;i+=2)
    prime[i]=2;
    for(ll i=3;i*i<=1000000;i++)
    {
        if(prime[i]==i)
        {
            for(ll j=i*i;j<=1000000;j+=i)
            prime[j]=i;
        }
    }
}
int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    ll n;
    cin>>n;
    ll a[n];
    for(ll i=0;i<n;i++)
    cin>>a[i];
    smallestPrime();
    bool pairWise=false;
   
    unordered_set<ll>present;
    for(ll i=0;i<n;i++)
    { 
        if(present.find(prime[a[i]])!=present.end())
        {
            pairWise=true;
            break;
        }
        present.insert(prime[a[i]]);
        
        
       
    }
    if(!pairWise)
    cout<<"pairwise coprime"<<'\n';
    else
    {
         ll gcd=a[0];
         for(ll i=1;i<n;i++)
         {
             gcd=__gcd(gcd,a[i]);
         }
         if(gcd==1)
         cout<<"setwise coprime"<<'\n';
         else
         cout<<"not coprime"<<'\n';
    }
    
    
    return 0;
}