#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define vi vector<int>
#define vll vector<ll>
#define ii pair<int, int>
#define vii vector<ii>
#define vvi vector<vi>
#define vvii vector<vii>
#define ld long double
#define iii tuple<int, int, int>
#define sc scanf
#define pb push_back
#define FOR(x, n) for(int i=x; i<=n; ++i)
#define MOD 1000000007

int a[1000005];

vi primes;

bitset<1000005> bs;
bitset<1000> divisor;

void f() {

    primes.pb(2);

    for(int i=3; i<998; i += 2) {
        bool flag = 1;
        for(int j=3; j<=(int) sqrt((double) i); j+=2) {
            if(i%j == 0) {
                flag = 0;
                break;
            }
        }
        if(flag) {
            primes.pb(i);
        }
    }
}

int main() {

    int n;
    sc("%d", &n);

    FOR(1, n) {
        sc("%d", &a[i]);
    }

    f();

    bool pairwise = 1, flag = 1;

    FOR(1, n) {

        if(!flag) {
            break;
        }

        if(!bs[a[i]]) {

            for(auto p: primes) {
                if(a[i]%p == 0) {
                    if(divisor[p]) {
                        pairwise = 0;
                        flag = 0;
                        break;
                    }
                    else {
                        divisor[p] = 1;
                    }
                }
            }
            bs[a[i]] = 1;
        }
        else {
            pairwise = 0;
            break;
        }
    }

    if(pairwise) {
        printf("pairwise coprime\n");
        return 0;
    }

    int g = 0;

    FOR(1, n) {
        g = __gcd(g, a[i]);
    }

    if(g == 1) {
        printf("setwise coprime\n");
    }
    else {
        printf("not coprime\n");
    }
}

