#include<bits/stdc++.h>
#define nl cout<<"\n"
#define mod 100000000000000007
#define fr(n) for(int i = 0; i<n; i++)
#define frr(j, n) for(int i = j; i<n; i++)
#define Mem(x) memset(x, 0, sizeof(x))
using namespace std;
typedef long long int lli;
int main(){
    int n;
    cin>>n;
    lli a[n];
    fr(n)cin>>a[i];
    lli x = a[0], k = a[0];
    int w = 1;
    frr(1,n){
        x = __gcd(x, a[i]);
        if(w==1){
            if(__gcd(k, a[i])!=1)w = 2;
            else k *= a[i];
        }
    }
    string ans[3] = {"pairwise coprime", "setwise coprime", "not coprime"};
    if(x!=1)w = 3;
    cout<<ans[w-1];
}