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

int a[maxn];

int solve() {
    int n,all=0,b,flag=1;
    cin>>n;
    for (int i=0;i<n;++i)
        cin>>b,a[b]++,all=__gcd(all,b);
    for (int i=2,sum=0;i<maxn;++i) {
        for (int j=i;j<maxn;j+=i) sum+=a[j];
        if (sum>1) flag=0;
    }
    return cout<<(flag?"pairwise coprime":all==1?"setwise coprime":"not coprime"),0;
}

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