#include<bits/stdc++.h>
using namespace std;

#define all(x) (x).begin(),(x).end()
#define ll long long
#define ld long double
#define pb push_back
#define FR first
#define SC second
#define MOD 1000000007
#define LLMN LONG_LONG_MIN
#define LLMX LONG_LONG_MAX
#define LDMX LDBL_MAX
#define LDMN LDBL_MIN
#define MAX 1000000
#define pll pair<ll, ll>
#define vl vector<ll>
#define vll vector< vl >
#define vb vector<bool>
#define vbb vector< vb >
#define vpl vector<pll>
#define vpll vector< vpl >

void solve()
{
	ll n, m ,k;
	cin>>n;
	vl a(n), factor(MAX, 0);
	for(ll i = 0; i < n; i++){
	    cin>>a[i];
	    factor[a[i]]++;
	}
	ll gcd = a[0];
	for(ll i = 1; i < n; i++)
	    gcd = __gcd(gcd, a[i]);
	if(gcd != 1)
	{
	    cout<<"not coprime";
	    return;
    }
    bool set_coprime = false;
    for(ll i = 2; i < MAX; i++)
    {
        ll count = 0;
        for(ll j = i; j <= MAX; j += i)
        {
            if(factor[j] != 0)
                count++;
        }
        if(count > 1)
        {
            //cout<<i<<" "<<count<<"\n";
            set_coprime = true;
            break;
        }
    }
    if(set_coprime)
        cout<<"set coprime";
    else
        cout<<"pairwise coprime";
}

int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	ll t = 1;
	//cin>>t;
	while(t--)
	{
		solve();
	}
	return 0;
}
