#include <bits/stdc++.h>
using namespace std;

#define ll long long
#define deb(x) cerr << #x << ":" << x << "\n"
#define all(x) x.begin(),x.end()

#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
#define ordered_set tree<int, null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update>
#define int ll

void do_it(vector<int> &v,int n){
    int g=v[0];
    for(int i=1;i<n;i++){
        g=__gcd(g,v[i]);
    }
    if(g==1){
        cout<<"setwise coprime\n";
    }else{
        cout<<"not coprime\n";
    }
}

void solve()
{
    int n;
    cin>>n;
    vector<int> v(n);
    unordered_set<int> st;
    for(auto &x:v){
        cin>>x;
        int num=x;
        // deb(num);
        if(num%2==0 && st.count(2)){
            do_it(v,n);
            return;
        }
        while(num%2==0){
            st.insert(2);
            num/=2;
        }
        // deb(num);
        for(int i=3;i*i<=num;i+=2){
            if(num%i==0){
                // deb(i);
                if(st.count(i)){
                    do_it(v,n);
                    return;
                }
                while(num%i==0)num/=i;
            }
        }
        if(num>2){
            // deb(n);
            if(st.count(num)){
                do_it(v,n);
                return;
            }
            st.insert(num);
        }
    }
    cout<<"pairwise coprime\n";
}

int32_t main()
{
    ios::sync_with_stdio(0);
    cin.tie(0);
    int t = 1;
    // cin >> t;
    while (t--)
    {
        solve();
    }
    return 0;
}