#include<bits/stdc++.h>
using namespace std;

const int mod = (int) (1e9)+7;
using ll = long long;

vector<int> v(1000005);

int cnt[1000005];

int main()
{
    vector<int> primes;
    for(int i = 2; i <= 1005; i++) {
        int sq = sqrt(i);
        int f = 0;
        for(int j = 2; j <= sq; j++) {
            if(i % j == 0) f = 1;
        }
        if(!f) primes.push_back(i);
    }
    
    memset(cnt, 0, sizeof(cnt));

    int n;
    scanf("%d", &n);
    bool pairwise = true;
    for(int i = 0; i < n; i++) {
        scanf("%d", &v[i]);
        int sq = sqrt(v[i]);
        int t = v[i];
        for(int j = 0; j < primes.size(); j++) {
            if(v[i] % primes[j] == 0) {
                if(cnt[primes[j]]) pairwise = false;
                cnt[primes[j]]++;
                while(t % primes[j]) t /= primes[j];
            }
        }
        if(cnt[t]) pairwise = false;
        if(t > 1) cnt[t]++;
    }
    if(pairwise) {
        puts("pairwise coprime");
        return 0;
    }

    int g = v[0];
    for(int i = 1; i < n; i++) {
        g = __gcd(g, v[i]);
    }
    if(g == 1) {
        puts("setwise coprime");
        return 0;
    }
    puts("not coprime");
}
