#include <bits/stdc++.h>
using namespace std;
typedef long double LD; 
typedef long long ll; 
#define int ll 
#define ff(i,a,b) for (int i = a; i < b; i++) 
#define bf(i,a,b) for (int i = a; i >= b; i--) 
#define all(v) v.begin(),v.end() 
#define show(a) for(auto xyz:a)cout<<xyz<<" ";cout<<endl;
#define F first 
#define S second
#define pb push_back
#define mp make_pair
#define lb lower_bound   
#define ub upper_bound
#define yes cout<<"YES"<<endl
#define no cout<<"NO"<<endl
#define one cout<<"-1"<<endl
#define pi 3.141592653589793238
#define mod 1000000007
#define intmx INT_MAX 
#define intmi INT_MIN

void solve(){
    int n;
    cin>>n;
    int a[n];
    ff(i,0,n)
    cin>>a[i];
    int gcd=a[0];
    ff(i,1,n){
        gcd=__gcd(gcd,a[i]);
    }
    int f=1;
    set<int> st;
    ff(j,0,n){
        int x=a[j];
        for(int i=2;i*i<=x;i++){
            if(x%i==0){
                if(st.find(i)!=st.end()){
                    f=0;
                    break;
                }
                else
                st.insert(i);
                while(x%i==0){
                    x=x/i;
                    if(x==0)
                    break;
                }
                if(x==0)
                break;
            }
        }
        if(x>=2)
        st.insert(x);
    }
    if(f)
    cout<<"pairwise coprime"<<endl;
    else if(gcd==1)
    cout<<"setwise coprime"<<endl;
    else
    cout<<"not coprime"<<endl;
}
signed main() {
    int t=1;
    //cin>>t;
    while(t--){
        solve();
    }
}
