#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp> 
#include <functional>
using namespace __gnu_pbds;  
using namespace std;

typedef tree<long long, null_type, less<long long>, rb_tree_tag, 
             tree_order_statistics_node_update> 
    new_data_set; 
    
//defines
typedef long long ll;
typedef long double ld;

ll a,b,c,n,m,k;

ll t=1;


void solve()
{
    cin>>n;
    vector<ll>v(n);
    for(ll i=0;i<n;i++)cin>>v[i];
    sort(v.begin(),v.end());
    k=v[0];
    for(ll i=0;i<n;i++)
    k=__gcd(k,v[i]);
     
    m=0;
    map<ll,ll>visited;
    for(ll j=0;j<n;j++){
        
        if(visited[v[j]]>=1){m=1;break;}
        
        for(ll i=2;i*i<=v[j];i++)
        {
            if(v[j]%i==0 and (visited[i]>=1 or visited[v[j]/i]>=1)){m=1;break;}
            else if(v[j]%i==0)visited[i]++,visited[v[j]/i]+=((i!=v[j]/i)?1:0);
        }
        if(m==1)break;
        visited[v[j]]++;
        //m+=(isPrime1(v[i])==0?1:0);
        
    }
    
    if(m==1)
    {
        cout<<((k==1)?"setwise coprime":"not coprime");
    }
    else cout<<"pairwise coprime";
 if(t>0)cout<<"\n";
}

int32_t main()
{
#ifdef ONPC
    freopen("input.txt", "r", stdin);
#endif
    ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);

  //cin>>t;
    while(t--)
    {
        solve();
    }
  //cout<<sum;
        
    return 0;
}
