#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;
#define int long long
using ldb = long double;
using pa = pair < int, int >;
template < typename T > using index_set = tree < T, null_type, less < T >, rb_tree_tag, tree_order_statistics_node_update >;
template < typename T > using MinPriorityQueue = priority_queue < T, vector < T >, greater < T > >;
#define pb push_back
#define all(c) c.begin(),c.end()
#define unique_sort(x) sort(all(x)), x.resize(distance(x.begin(), unique(all(x))))
#define F  first
#define S  second
#define f(i,x,n) for(int i=x;i<n;i++) 
const int MOD = 1e9 + 7, INF = INT_MAX, N = 1e6 + 10;
const double PI = acos(-1);
const int LINF = LLONG_MAX;
int maps[N];
int32_t main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int n;
    cin >> n;
    int gc = 0;
    int v[n];
    int one = 0;

    set<int>sets;
    f(i,0,n){
        cin >> v[i];
        sets.insert(v[i]);
        one += (v[i] == 1);
    }
    gc = v[0];
    f(i,1,n){
        gc = __gcd(v[i],gc);
    }
    if(sets.size() < n){
        if(gc == 1){
            cout << "setwise coprime";
        }
        else{
            cout << "not coprime";
        }
        return 0;
    }
    int spc = 1;
    int pc = 1;
    f(k,0,n){
        for(int i=2; i<=sqrt(v[k]); i++){   
            if (v[k]%i==0) { 
                maps[i]++;
                if(v[k]/i != i)
                    maps[v[k]/i]++;
            } 
        } 
    }
    for(int k = 0;k < n;k++){
        int ch = 0;
        for (int i=2; i<=sqrt(v[k]); i++){   
            if (v[k]%i==0) { 
                if(maps[i] > 1 or maps[v[k]/i] > 1){
                    ch = 1;
                    break;
                }
            } 
        }     
        if(ch){
            pc = 0;
            break;
        }   
    }
    if(pc){
        cout << "pairwise coprime";
        return 0;
    }
    if(!pc and gc == 1){
        cout << "setwise coprime";
    }
    else{
        cout << "not coprime";
    }
    return 0;
}

