#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp> 
#include <ext/pb_ds/tree_policy.hpp> 
using namespace __gnu_pbds; 
#define ordered_set tree<int, null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update>
using namespace std;
#define ll long long int
#define ld long double
#define ff first
#define ss second  
#define endl '\n'
#define pb push_back
#define t_case ll tt; cin>>tt; while (tt--)
#define all(v) v.begin(),v.end()
#define ub(a,x) upper_bound(all(a),x)-a.begin()
#define lb(a,x) lower_bound(all(a),x)-a.begin()
#define fr(a,b,c) for (ll a=b;a<c;a++)
#define take(xx,n) for (int i=0;i<n;i++) cin>>xx[i];
#define take1(xx,n) for (int i=1;i<=n;i++) cin>>xx[i];
#define fastio ios_base::sync_with_stdio(false); cin.tie(NULL);
const auto inf=LLONG_MAX; 

int main() 
{
	fastio
	//t_case
	{
		ll sum=0,f=0,ans=0,n,m=0,mx=-inf,mn=inf,p ;cin>> n ;
		ll a[n]; take (a,n);ans=__gcd(a[0],a[1]);
		fr(i,2,n) ans=__gcd(ans,a[i]);
		if (ans>1 ) cout<<"not coprime";
		else {
			map<int,int> mp;
			f=0;
			fr(i,0,n) {
				if (a[i]%2==0) {
					if (mp[2]){
						f=1; goto level;
					}
					else mp[2]++;
					while(a[i]%2==0) a[i]=a[i]/2;
				}
				fr(j,3,sqrt(a[i])+1) {
					if (a[i]%j==0) {
						if (mp[j]){
							f=1; goto level;
						}
						else mp[j]++;
						while(a[i]%j==0) a[i]=a[i]/j;
					}
				}
			}
			level :
			if (!f) cout<<"pairwise coprime";
			else cout<<"setwise coprime";
		}
		//cout<<ans;
		cout<<endl;
	}
	return 0;
}