#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;

void debug_out() { cerr << endl; }
template<class T> ostream& prnt(ostream& out, T v) { out << v.size() << '\n'; for(auto e : v) out << e << ' '; return out;}
template<class T> ostream& operator<<(ostream& out, vector <T> v) { return prnt(out, v); }
template<class T> ostream& operator<<(ostream& out, set <T> v) { return prnt(out, v); }
template<class T1, class T2> ostream& operator<<(ostream& out, map <T1, T2> v) { return prnt(out, v); }
template<class T1, class T2> ostream& operator<<(ostream& out, pair<T1, T2> p) { return out << '(' << p.st << ' ' << p.nd << ')'; }
template <typename Head, typename... Tail> void debug_out(Head H, Tail... T) { cerr << " " << H; debug_out(T...);}

#define dbg(...) cerr << #__VA_ARGS__ << " ->", debug_out(__VA_ARGS__)
#define dbg_v(x, n) do{cerr<<#x"[]: ";for(int _=0;_<n;++_)cerr<<x[_]<<" ";cerr<<'\n';}while(0)
#define dbg_ok cerr<<"OK!\n"
#define  st first
#define  nd second
#define int long long 


template <typename T> using ordered_set =  tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;

typedef cc_hash_table<int, int, hash<int > > ht;

const int  M    = 1000000007;
const int  maxn =  1000001 ;
const long long   inf  =  LONG_LONG_MAX    ;
const long double eps = 1.084202e-19;

vector<int> smallest_factor;
vector<bool> prime;
vector<int> primes;
int b[maxn];

void sieve(int maximum) {
    maximum = max(maximum, 2ll);
    smallest_factor.assign(maximum + 1, 0);
    prime.assign(maximum + 1, true);
    prime[0] = prime[1] = false;
    primes = {};

    for (long long p = 2; p <= maximum; p++)
        if (prime[p]) {
            smallest_factor[p] = p;
            primes.push_back(p);

            for (long long i = p * p; i <= maximum; i += p)
                if (prime[i]) {
                    prime[i] = false;
                    smallest_factor[i] = p;
                }
        }
}

// Prime factorizes n in worst case O(sqrt n / log n). Requires having run `sieve` up to at least sqrt(n).
// If we've run `sieve` up to at least n, takes O(log n) time.
vector<pair<long long, int>> prime_factorize(long long n) {
    assert(1 <= n && n <= (long long) smallest_factor.size() * (long long) smallest_factor.size());
    vector<pair<long long, int>> result;

    if (n < (int) smallest_factor.size()) {
        while (n != 1) {
            long long p = smallest_factor[n];
            int exponent = 0;

            do {
                n /= p;
                exponent++;
            } while (n % p == 0);

            result.emplace_back(p, exponent);
        }

        return result;
    }

    for (long long p : primes) {
        if (p * p > n)
            break;

        if (n % p == 0) {
            result.emplace_back(p, 0);

            do {
                n /= p;
                result.back().second++;
            } while (n % p == 0);
        }
    }

    if (n > 1)
        result.emplace_back(n, 1);

    return result;
}

int32_t main(){
     ios_base::sync_with_stdio(false);
     cin.tie(NULL); 
     sieve(maxn);
     int n ; 
     cin >> n ; 
     int a[n] ; 
     int g = 0 ;
     for(int i = 0 ; i< n ; i++){
           cin>>a[i];
           g = __gcd(g,a[i]);
     }
     bool ok = true ; 
     for(int i = 0 ; i< n ; i++){
           vector<pair<int,int> > v = prime_factorize(a[i]);
           for(auto j : v){
                 if(b[j.st]>0){
                       ok = false;
                       break;
                 }
                 b[j.st]+=1;
           }
     }
     if(ok){
           cout << "pairwise coprime";
     }
     else
     {
           if(g==1){
                 cout <<"setwise coprime";
           }
           else{
                 cout << "not coprime";
           }
     }
     



}
/*

*/

Measured memory_bytes: 27560