#include <iostream>
#include <map>
using namespace std;
constexpr long long max(long long a, long long b){ return a>b?a:b;}
const int max_size = 5*(int)1e7+1;
long long min_factor[max_size] = {0,1,};
int n;
map<long, long> check;

void init(){
    for(long long i=2; i < max_size ; ++i) min_factor[i] = i;
    for(long long i=2 ; i*i < max_size ; ++i){
        if(min_factor[i] != i) continue;
        for(long long multi = 1; multi*i < max_size ; ++multi){
            min_factor[i*multi] = i;
        }
    }
}

int main(){
    init();
    scanf("%d", &n);
    for(int i =0,a ; i <n ; ++i){
        scanf("%d", &a);
        map<long ,long> temp;
        while(a != 1){
            if(a%min_factor[a] == 0 and temp[min_factor[a]] == 0) {
                check[min_factor[a]]++;
                temp[min_factor[a]]++;
            }
            a /= min_factor[a];
        }
    }
    long long ans = 0;
    for(auto& val : check){
        if(val.first <= 1) continue;
        ans = max(ans, val.second);
    }
    if(ans == n){
        printf("%s", "not coprime");
    }
    else if(ans == 1){
        printf("%s", "pairwise coprime");
    }
    else{
        printf("%s", "setwise coprime");
    }

    return 0;
}