#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define fast ios_base::sync_with_stdio(false);  cin.tie(NULL); cout.tie(NULL);
#define scan(a,n) for(long int index=0;index<n;index++) cin>>a[index];
#define print(a,n) for(long int index=0;index<n;index++) cout<<a[index]<<" ";cout<<endl;
#define mod 16565457023
#define pb push_back
#define mp make_pair
#define ss second
#define ff first
#define vli vector<long long int>
#define vlli vector<pair<long long int,long long int>>
#define vsi vector<string>
#define vci vector<char>
#define all(n) (n.begin(),n.end())


 
int main() {
   #ifndef ONLINE_JUDGE
    freopen("input.txt","r",stdin);
    freopen("output.txt","w",stdout);
    #endif
    fast;
    ll n;
    cin>>n;
    ll a[n],i;
    scan(a,n);
    ll mu=1,lc=1,gc=__gcd(a[0],a[1]);
    for(i=0;i<n;i++){
        mu*=a[i];
        mu%=mod;
        lc=((a[i]*lc)/(__gcd(a[i],lc)));
        lc%=mod;
        gc=__gcd(a[i],gc);
        // cout<<mu<<" "<<lc<<endl;

    }
    if(lc==mu){
        cout<<"pairwise coprime";
        return 0;
    }
    if(gc==1) cout<<"setwise coprime";
    else cout<<"not coprime";


return 0;    
 }  