#include<bits/stdc++.h>
using namespace std;
int main(){
    typedef long long int ll;
    ll n;
    cin>>n;
    ll a[n];
    unordered_map<ll,ll>mp;
    vector<ll>siege(1000001,0);
    for(int i = 2 ; i <= 1000000 ; i++){
        if(siege[i] == 0){
            for(int j = i+i; j <= 1000000 ; j+=i){
                siege[j] = 1;
            }
        }
    }
    vector<ll>siege2;
    for(int i = 2 ; i < 1000001;  i++){
        if(siege[i] != 1){
            siege2.push_back(i);
        }
    }

    int f = 0;
    for(int i = 0 ;  i <n ; i++){
        cin>>a[i];
        ll q = sqrt(a[i]);
        ll j = 0;
        while(siege2[j] <= q){
            if(a[i]%siege2[j] == 0){
                mp[siege2[j]]++;
                if((a[i]/siege2[j]) != siege2[j]){
                    mp[a[i]/siege2[j]]++;
                }
                if(mp[siege2[j]] >= 2 || mp[a[i]/siege2[j]] >= 2){
                    f = 1;
                    break;
                }
            }
            j++;
        }
    }
    if(f == 1){
        ll gc = a[0];
        for(int i = 1 ; i < n ; i++){
            gc = __gcd(a[i],gc);
        }
        if(gc == 1){
            cout<<"setwise coprime"<<endl;
        }
        else{
            cout<<"not coprime"<<endl;
        }
    }
    else{
        cout<<"pairwise coprime"<<endl;
    }
}
