#include<cstdio>
#include<vector>
#include<numeric>
using namespace std;
using ll = long long;
using ull = unsigned long long;
const static unsigned MAX_N = 1000000;
unsigned prime_divisor[MAX_N+1];

int main(){
	for (unsigned i = 4; i <= MAX_N; i += 2){
		prime_divisor[i] = 2;
	}
    unsigned twoi;
	for (unsigned i = 3; i*i <= MAX_N; i += 2){
		if(!prime_divisor[i]){
			twoi = i<<1;
			for (unsigned j = i*i; j <= MAX_N; j += twoi){
				prime_divisor[j] = i;
			}
		}
	}
    unsigned N, a1, a2, tmp;
    scanf("%u\n%u %u", &N, &a1, &a2);
    vector<unsigned> prime_candidate;
    bool pairwise = true;
	unsigned n = a1, n_factor = 1;
	while(prime_divisor[n]){
        prime_candidate.push_back(prime_divisor[n]);
		n /= prime_divisor[n];
	}
    prime_candidate.push_back(n);
    for(auto i : prime_candidate){
        if(!(a2 % i)){
            pairwise = false;
            break;
        }
    }
    if(pairwise){
        n = a2;
        while(prime_divisor[n]){
            prime_candidate.push_back(prime_divisor[n]);
            n /= prime_divisor[n];
        }
        prime_candidate.push_back(n);
    }
    unsigned setwise = std::gcd(a1, a2);
    for(unsigned i = 2; i < N; i++){
        scanf("%u", &tmp);
        for(auto i : prime_candidate){
            if(!(tmp % i)){
                pairwise = false;
                break;
            }
        }
        if(pairwise){
            n = tmp;
            while(prime_divisor[n]){
                prime_candidate.push_back(prime_divisor[n]);
                n /= prime_divisor[n];
            }
            prime_candidate.push_back(n);
        }
        setwise = gcd(setwise, tmp);
    }
    if(pairwise){
        printf("pairwise coprime\n");
        return 0;
    }
    if(setwise == 1){
        printf("setwise coprime\n");
        return 0;
    }
    printf("not coprime\n");
	return 0;
}