#include <bits/stdc++.h>

using namespace std;

const int N = 1e6+5;

const int mod = 1e9+7;

int n;
int cnt[N];
bool did[N];

int main(){
    scanf("%d " , &n);
    int totG = 0;
    for(int i = 1; i <= n; i++){
       int x;
       scanf("%d" , &x);
       cnt[x]++;
       totG = __gcd(x , totG);
    }
    bool exit = 0;
    for(long long i = 2; i < N; i++){
        if(did[i])
            continue;
        if(cnt[i] > 1){
            exit = 1;
        }
        int found = 0;
        for(long long j = i + i; j < N; j += i){
            found += cnt[j];
            did[j] = 1;
        }
        if(found > 1)
            exit = 1;
        if(exit)
            break;
    }
    //cout << exit << "\n" ;
    if(!exit){
        puts("pairwise coprime");
    } else if(exit && totG == 1){
        puts("setwise coprime");
    } else {
        puts("not coprime");
    }
}
