#include <bits/stdc++.h>
#define rep(i, N) for(ll i = 0; i < N; i++)
using ll = long long;
using namespace std;
#define MOD 1000000007
typedef pair<ll,ll> Pl;
typedef vector<int> vi;

int main() {
    int n;
    cin >> n;
    vi a(n);
    rep(i,n) cin >> a[i];

    int ggg = a[0];
    rep(i,n-1) ggg = __gcd(ggg, a[i+1]);
    int cnt = 0, flag = 1;
    rep(i,n){
        if(a[i]%2 == 0) cnt++;
    }
    if(cnt > 1){
        flag = 0;
    }
    if(flag){
        for(int j = 3; j < 1000; j += 2){
            cnt = 0;
            rep(i,n){
                if(a[i]%j == 0) cnt++;
            }
            if(cnt > 1){
                flag = 0;
                break;
            }
        }
    }

    if(flag){
        puts("pairwise coprime");
    }else if(ggg == 1){
        puts("setwise coprime");
    }else{
        puts("not coprime");
    }
}
