#include <bits/stdc++.h>
using namespace std;
int ans, n;
bool check[1000000], dk;
void fact(int x){
    int t = x; bool prime = true;
    for(int i = 2; i <= x / 2; i++){
        if(t % i == 0){
            prime = false;
            if(!check[i]) check[i] = true;
            else {dk = true; return;}
            while(t % i == 0) t /= i;
        }
    }
    if(prime) check[x] = true;
}
int main(){
    ios_base::sync_with_stdio(0); cin.tie(0); 
    cin >> n;
    for(int i = 0; i < n; i++){
        int x; cin >> x;
        ans = i == 0 ? x : __gcd(ans, x);
        if(!dk) fact(x);
    }
    if(dk){
        if(ans == 1) cout << "setwise coprime";
        else cout << "not coprime";
    }
    else cout << "pairwise coprime";
    return 0;
}