#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 tree<int, null_type, less_equal<int>, rb_tree_tag, tree_order_statistics_node_update> ordered_set;

const int MAX_N = 1e5 + 5;
const int MAX_L = 20; // ~ Log N
const long long MOD = 1e9 + 7;
const long long INF = 1e9 + 7;

typedef long long ll;
typedef vector<int> vi;
typedef pair<int,int> ii;
typedef vector<ii> vii;
typedef vector<vi> vvi;

#define watch(x) cerr << "\n" << (#x) << " is " << (x) << endl
#define LSOne(S) (S & (-S))
#define isBitSet(S, i) ((S >> i) & 1)

void add_self(int &a,int b)
{
	a+=b;
	a%=MOD;
}
vector<int> count_primes(int n) {
    const int S = 10000;

    vector<int> primes;
    int nsqrt = sqrt(n);
    vector<char> is_prime(nsqrt + 1, true);
    for (int i = 2; i <= nsqrt; i++) {
        if (is_prime[i]) {
            primes.push_back(i);
            for (int j = i * i; j <= nsqrt; j += i)
                is_prime[j] = false;
        }
    }

    
    return primes;
}
void solve() {
	int n;
	cin>>n;int k=0;
	vector<int> v(n);
	for(int i=0;i<n;i++)
	
	{cin>>v[i];k=__gcd(k,v[i]);}
	
	bool flag1=0;
	vector<int> pr=count_primes((int)1e6);
	for(int i=0;i<=pr.size();i++)
	{int cnt=0;
		for(int j=0;j<n;j++)
		{
			if(pr[i]!=0)
			if(v[j]%pr[i]==0) cnt++;
			
		}
		if(cnt>1)
		{
			watch(cnt);
			flag1=1;
			break;
		}
		
	}

	if(flag1==0)
	{
		cout<<"pairwise coprime";
		return;
	}
	if(k==1)
	{
		cout<<"setwise coprime";
		return;
	}
	cout<<"not coprime";
}

int main() {
    ios_base::sync_with_stdio(0);
    cin.tie(0); cout.tie(0);
    #ifdef LOCAL
        freopen("input.txt", "r", stdin);
        freopen("output.txt", "w", stdout);
    #endif

    int tc=1; //cin >> tc;
    for (int t = 1; t <= tc; t++) {
        //cout << "Case #" << t  << ": ";
        solve();
    }
}
