#pragma GCC target("avx2")
#pragma GCC optimize ("O3")
#pragma GCC optimize ("unroll-loops")
#include<bits/stdc++.h>

#define f			first
#define sz(a)       ((int)(a).size())
#define s			second
#define all(v)		v.begin(),v.end()
#define pii 		pair<int,int>
#define vpii 		vector<pii>
#define eb			emplace_back
#define pb			push_back
#define fo(i,n)		for(int i=0;i<n;i++)
#define Fo(i,k,n)	for(int i=k;i<n;i++)
#define vi			vector<int>

using namespace std;
using ll  = long long;
using lld = long double;

const int oo = 0x3f3f3f3f;
const ll MOD = 1000000007;
const int N = 1e6 + 10;
int fre[N];



signed main(){

#ifndef ONLINE_JUDGE
	//freopen("in.txt" , "r" , stdin);
#endif
	ios_base::sync_with_stdio(0);cin.tie(0);

    int n;
    cin >> n;
    int p = 0;

    fo(i , n) {
        int x;
        cin >> x;
        p = __gcd(p , x);
        fre[x] = 1;
    }
    
    bool pair_wise = 1;
    for(int i = 2 ; i < N ; i++){
        int cnt = 0;
        for(int j = i ; j < N ; j += i){
            if(fre[j]) cnt++;
            if(cnt >= 2){
                pair_wise = false;
                break;
            }
        }
        if(!pair_wise) break;
    }

    if(pair_wise)
        cout << "pairwise coprime\n";
    else if(p == 1)
        cout << "setwise coprime\n";
    else
        cout << "not coprime\n";

    return 0;
}

