#include <iostream>
#include <algorithm>
#include <vector>
#include <cmath>
#include <utility>
typedef long long ll;
using namespace std;
const int mod=1e9+7;

string solve(){
    int n;
    cin>>n;
    int a[n];
    for(int i=0;i<n;i++) cin>>a[i];
    const int N=1e6+1;
    bool co=1;
    vector<bool> com(N,0);
    for(int i=2;i<N;i++){
        if(!com[i]){
            for(int j=2*i;j<N;j+=i) com[j]=1;
            if(co) {
                int pp=0;
                for(int x:a) if(x%i == 0) pp++;
                if(pp > 1) co=0;
            }
        }
    }
    if(co) return "pairwise coprime";
    int g=a[0];
    for(int x:a) g=__gcd(x,g);
    if(g == 1) return "setwise coprime";
    return "not coprime";

}

int main()
{
#ifndef ONLINE_JUDGE
    freopen("input.txt","r",stdin);
    freopen("output.txt","w",stdout);
#endif
    int t=1;
    //cin>>t;
    while(t--) cout<<solve()<<'\n';
    //while(t--) solve(),cout<<'\n';
    return 0;
}
