#include <bits/stdc++.h>
#define int ll
using namespace std;
typedef long long ll;
const int INF = 0x3f3f3f3f;
const int mod = 1e9+7;
const int MAX = 1e6 + 10;

int dir[25]={2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97};
int a[MAX];
int b[100];
void solve() {
    int n;
    cin>>n;
    for(int i=0;i<n;i++){
        cin>>a[i];
    }
    int begin=__gcd(a[0],a[1]);
    int ji=0;
    if(begin>1){
        ji++;
    }
    for(int i=2;i<n;i++){
        begin=__gcd(begin,a[i]);
        if(begin>1){
            ji++;
        }
    }
    if(begin>1){
        cout<<"not coprime";
    }else if(ji!=0){
        cout<<"setwise coprime";
    }else{
        sort(a,a+n);
        for(int i=0;i<25;i++) {
            int ji=0;
            for(int j=0;j<n;j++){
                if(a[j]%dir[i]==0){
                    ji++;
                }
                if(ji>1){
                    cout<<"setwise coprime";
                    return;
                }
            }
        }
        cout<<"pairwise coprime";
    }
}

signed main() {
    //ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
    int _ = 1;
    //cin>>_;
    while (_--) {
        solve();
    }
    return 0;
}
