// Code by Nguyen Huu Lam
#include<bits/stdc++.h>
#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;

typedef long long LL;

#define y0 Sword_Art_Online
#define y1 Your_lie_in_April
#define yn Darling_in_the_Franxx
#define tm Plastic_Memories
#define lr Charlotte
#define norm Weathering_with_you
#define left Violet_Evergarden
#define have Date_a_live
#define ends Your_name
#define prev Five_centimeters_per_second
#define hash Silent_voice
#define endl "\n"

template<typename T> using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
mt19937_64 rng(chrono::high_resolution_clock::now().time_since_epoch().count());

LL Rand(LL l, LL h){
    return uniform_int_distribution<LL>(l, h)(rng);
}

template <typename T> void read(T &t){
    t = 0; char ch = getchar(); int f = 1;
    while (!isdigit(ch)) { if (ch == '-') f = -1; ch = getchar(); }
    do { (t *= 10) += ch - '0'; ch = getchar(); } while (isdigit(ch)); t *= f;
}

const LL MaxN = 1 + 1e6;

LL n, a[MaxN], cd1 = 1, mark[MaxN];
vector<LL> prime;

void InOut(){
    #define TASK "ABC"
    freopen(TASK".inp","r",stdin);
    freopen(TASK".out","w",stdout);
}

int main(){
    // InOut();
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    cin >> n;
    for(int i = 0 ; i < n ; ++i) cin >> a[i];
    for(int i = 2 ; i <= 1000 ; ++i)
    if(!mark[i]){
        prime.push_back(i);
        for(int j = 2 ; i * j <= 1000000 ; ++j) mark[i * j] = 1;
    }
    for(int p : prime){
        LL cnt = 0;
        for(int i = 0 ; i < n ; ++i)
        if(a[i] % p == 0) cnt++;
        if(cnt > 1){
            cd1 = 0;
            break;
        }
    }
    LL gcd = a[0];
    for(int i = 1 ; i < n ; ++i)
    gcd = __gcd(a[i], gcd);
    if(cd1 && gcd == 1) cout << "pairwise coprime" << endl;
    else if(gcd == 1) cout << "setwise coprime" << endl;
    else cout << "not coprime" << endl;

    return 0;
}