#include<bits/stdc++.h>
using namespace std;
const int N =1e6+10;
const double pi=acos(-1.0);
#define ll long long
#define si(x) scanf("%d",&x)
#define sl(x) scanf("%lld",&x)
#define pi(x) printf("%d",x)
#define pl(x) printf("%lld",x)
const ll mod=1e9+7;
int a[N];
int vis[N];
signed main(){
    int n;
    si(n);
    int tmp=0;
    for (int i = 1; i <=n ; ++i) {
        si(a[i]);
        if(i==1){
            tmp=a[i];
        }else{
            tmp=__gcd(tmp,a[i]);
        }
    }
    if(tmp!=1){
        puts("not coprime");
    }else{
        random_shuffle(a+1,a+1+n);
  random_shuffle(a+1,a+1+n);
        for (int i = 1; i <=n ; ++i) {
            for(int j=2;j<=sqrt(a[i]);j++){
                if(a[i]%j)continue;
                if(vis[j]||vis[a[i]/j]){
                    puts("setwise coprime");
                    return 0;
                }
                vis[j]=vis[a[i]/j]=1;
            }
        }
        puts("pairwise coprime");
    }
    return 0;
}