#include <bits/stdc++.h>
using namespace std;
int a[1000005], cnt[1000005], cnt2[1000005];
int main(){
    int n, g = 0;
    scanf("%d", &n);
    for(int i=1;i<=n;i++) scanf("%d", &a[i]), cnt[a[i]]++, g = __gcd(a[i], g);
    bool ok = 1;
    for(int i=2;i<=1000000;i++){
        for(int j=i+i;j<=1000000;j+=i){
            cnt2[i] += cnt[j];
            if(cnt2[i] > 1) ok = 0;
        }
    }
    if(ok) printf("pairwise coprime\n");
    else if(g == 1) printf("setwise coprime\n");
    else printf("not coprime\n");
}