#include <bits/stdc++.h>
#define fo(i,a,b) for(int i=(a);i<=(b);++i)
#define rv(i,a,b) for(int i=(a);i>=(b);--i)
#define ll long long
#define SZ(x) (int)(x.size())
#define pb(x) push_back(x)
#define P pair<int,int>
using namespace std;
const int M = 1100000;
const ll inf = 9e18;
int n,m,k;
int a[M]={0};
const int mod = 1e9+7;
bool vs[M]={0};
void solve() {
    cin >> n;
    fo(i,1,n) cin>>a[i];
    int co=a[1];
    fo(i,2,n) {
        co = __gcd(co,a[i]);
    }
    sort(a+1,a+1+n);
    int flag=2;
    fo(i,1,M-1) {
        if(vs[a[i]] && a[i]>1) {flag=1;break;}
        int j=a[i];
        while(j<M) {
            vs[j]=1;
            j+=a[i];
        }
    }
    if(flag==2) printf("pairwise coprime\n");
    else if(co==1) printf("setwise coprime\n");
    else printf("not coprime\n");
}
int main()
{ 
    int t;
    //cin >> t;
    t = 1;
    while (t--) {
        solve();
    }
    return 0;
}
