#include <bits/stdc++.h>
#define fast() ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define ll long long int
using namespace std;
#define MAXN   1000005 
   
ll spf[MAXN];  
void sieve() 
{ 
    spf[1] = 1; 
    for (ll i=2; i<MAXN; i++) 
   
        spf[i] = i; 
   
    for (ll i=4; i<MAXN; i+=2) 
        spf[i] = 2; 
  
    for (ll i=3; i*i<MAXN; i++) 
    { 
         
        if (spf[i] == i) 
        { 
        
            for (ll j=i*i; j<MAXN; j+=i) 
   
                if (spf[j]==j) 
                    spf[j] = i; 
        } 
    } 
} 
set<ll> getFactorization(ll x) 
{ 
    set<ll> ret; 
    while (x != 1) 
    { 
        
        ret.insert(spf[x]); 
        x = x / spf[x]; 
    } 
    return ret; 
} 
int main() {
    fast();
    // ll t;
    // cin>>t;
    // while(t--)			
    // {
         
    // }
    sieve();
    ll n;
    cin>>n;
    ll a[n];
    for(ll i=0;i<n;i++)
    cin>>a[i];
    ll g=0;
    for(int i=0;i<n;i++)
    g=__gcd(g,a[i]);
    if(g!=1)
    {
        cout<<"not coprime"<<endl;
    }
    else
    {
       int flag=1;
       vector<ll>vis(1000005,0);
       for(ll i=0;i<n;i++)
       {
           set<ll>s=getFactorization(a[i]);
           for(auto i:s)
           {
               if(vis[i])
               {
                   flag=0;
                  // cout<<i<<endl;
                   break;
               }
               //cout<<i<<" ";
               vis[i]=1;
           }
           cout<<endl;
           if(!flag)
           break;
       }
       if(flag)
       cout<<"pairwise copirme";
       else
       cout<<"setwise coprime";
    }
}