#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> iint;
typedef pair<ll,ll> llll;
#define ALL(x) (x).begin(),(x).end()
const ll zero = 0;
const ll INF = 9223372036854775807; //10^18
const int inINF = 2147483647; //10^9
const ll MOD = 1000000007; //10^9+7
const ll MOD2 = 998244353;
void Yes() {printf("Yes\n");}
void No() {printf("No\n");}
void YES() {printf("YES\n");}
void NO() {printf("NO\n");}

int main(){
    ll N;
    cin >> N;
    vector<ll> a(N);
    for (ll i = 0; i < N; i++) {
        cin >> a[i];
    }

    ll tmp = a[0];
    for (ll i = 1; i < N; i++) {
        tmp = __gcd(tmp, a[i]);
    }
    if(tmp > 1){
        printf("not coprime\n");
        return 0;
    }

    if(N > 80000){
        printf("setwise coprime\n");
        return 0;
    }

    ll MA = 1000005;
    vector<ll> x(MA, 0);
    for (int i = 0; i < N; i++) {
        tmp = a[i];
        for (ll j = 2; j*j <= tmp; j++) {
            if(tmp % j == 0){
                if(x[j] > 0){
                    printf("setwise coprime\n");
                    return 0;
                }
                x[j]++;
                tmp  = tmp / j;
            }
            while(tmp % j == 0){
                tmp = tmp / j;
            }
        }
        if(tmp > 1){
            if(x[tmp] > 0){
                printf("setwise coprime\n");
                return 0;                
            }
            x[tmp]++;
        }
    }

    printf("pairwise coprime\n");

}