#include<bits/stdc++.h>
#define ll long long
#define pb push_back
#define pll pair<long long, long long>
#define f first
#define s second
#define debug cout<<"here\n" 
#define MOD 1000000009

const int MAXN = 2e5 +15;
 
using namespace std;

int hp[1000001];
int A[1000001];
bool vis[1000001];

void solve(){   
    int n; cin>>n;
    for(int i=0; i<n; i++) cin>>A[i];
    int g = __gcd(A[0],A[1]);
    for(int i=2; i<n; i++){
        g = __gcd(g,A[i]);
    }
    if(g != 1){
        cout<<"not coprime";
        return;
    }
    for(int i=2; (ll)i*i <= 1000000; i++){
        hp[i] = i;
    }
    for(int i=2; (ll)i*i <= 1000000; i++){
        if(hp[i] == i){
            for(int j=i*i; j<=1000000; j+=i){
                hp[j] = i;
            }
        }
    }
    hp[1] =1 ;

    for(int i=0; i<n; i++){
        int x = A[i];
        while(x != 1){
            int y = hp[x];
            if(vis[y] != 0){
                cout<<"setwise coprime";
                return;
            }
            while(x%y ==0) x /= y;
            vis[y] = 1;
        }
    }
    cout<<"pairwise coprime";
    

}
 
int main(){
    ios_base::sync_with_stdio(false);
    cout.tie(0); cin.tie(0);    
    cout<<fixed<<setprecision(12);

    int t =1; //cin>>t;
    for(int i=1; i<= t; i++){
        solve();
        cout<<"\n";
    }
    
    return 0;
}