#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e6 + 7, mod = 1e9 + 7;
typedef long long ll;
int prime[maxn + 1];
int visit[maxn + 1];
void Prime(){
    memset(visit, 0, sizeof(visit));
    memset(prime, 0, sizeof(prime));
    for (int i = 2;i <= maxn; i++) {
//        cout<<" i = "<<i<<endl;
        if (!visit[i]) {
            prime[++prime[0]] = i;      //纪录素数， 这个prime[0] 相当于 cnt，用来计数
        }
        for (int j = 1; j <=prime[0] && i*prime[j] <= maxn; j++) {
//            cout<<"  j = "<<j<<" prime["<<j<<"]"<<" = "<<prime[j]<<" i*prime[j] = "<<i*prime[j]<<endl;
            visit[i*prime[j]] = 1;
            if (i % prime[j] == 0) {
                break;
            }
        }
    }
}
int n, a[maxn];
int num[maxn];
int main() {
    scanf("%d", &n);
    for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
    Prime();
    bool f = true;
    for (int i = 1; i <= n; i++) {
        int p = a[i];
        for (int j = 1; j <= prime[0] && p >= prime[j]; j++) {
            if(p % prime[j] == 0) {
                if(num[prime[j]]) f = false;
                num[prime[j]] = 1;
                while (p % prime[j] == 0) p /= prime[j];
                if(p == 1) break;
            }
            if(!visit[p]) {
                if(num[p]) f = false;
                num[p] = 1;
                break;
            }
        }
    }
    int gcd = a[1];
    for (int i = 2; i <= n; i++) gcd = __gcd(gcd, a[i]);
    if(f) printf("pairwise coprime\n");
    else if(!f && gcd == 1) printf("setwise coprime\n");
    else printf("not coprime\n");
}
