#pragma GCC optimize(3,"Ofast","inline")
#include<bits/stdc++.h>

#define int long long
#define pb push_back
#define pf push_front
#define st first
#define nd second
#define sz(x) ((int)x.size())
#define ins insert
#define fastio ios::sync_with_stdio(false),cin.tie(0),cout.tie(0)
#define lowbit(x) ((x)&(-x))
#define pi acos(-1.0)
using namespace std;

const int maxn=1e6+10;
const int maxe=1e6+10;
const int mod=1e9+7;
const int inf=0x3f3f3f3f;

inline int read(){
    int x=0; bool flag=1; char ch=getchar();
    while(ch<'0'||ch>'9') {if(ch=='-') flag=0; ch=getchar();}
    while(ch>='0'&&ch<='9') {x=(x<<1)+(x<<3)+ch-'0'; ch=getchar();}
    if(flag) return x;
    return ~(x-1);
}
inline void write(int x){
    if(x<0) {x=~(x-1); putchar('-');}
    if(x>9) write(x/10);
    putchar(x%10+'0');
}

int gcd(int a,int b){
    return b==0?a:gcd(b,a%b);
}
int lcm(int a,int b){
    return a*b/(gcd(a,b));
}

int a[maxn],num[maxn]={};
main(){
    fastio;
    int n=read();
    for(int i=1;i<=n;++i)a[i]=read();
    int g=0;
    int f=0;
    for(int i=1;i<=n;++i){
        g=gcd(g,a[i]);
        for(int j=2;j*j<=a[i];++j){
            if(a[i]%j==0){
                num[j]++;
                if(num[j]>1)f=1;
                while(a[i]%j==0)a[i]/=j;
            }
        }
        num[a[i]]++;
        if(num[a[i]]>1)f=1;
    }
    if(g>1)cout<<"not coprime"<<endl;
    else if(f)cout<<"setwise coprime"<<endl;
    else cout<<"pairwise coprime"<<endl;
}
