#include<iostream>
#include<algorithm>
#include<bits/stdc++.h>
#define ll  long long int
#define mod 1000000007
using namespace std;
	
main()
{
		ll n;
		cin>>n;
		
		ll a[n];
		for(ll i=0;i<n;i++)cin>>a[i];
		ll gcd = a[0];
		for(ll i=0;i<n;i++)
			gcd = __gcd(gcd,a[i]);
			
		if(gcd==1)
		{
			cout<<"setwise coprime"<<endl;
		}		
		else
		{
			ll f=0;
			ll tt=0;
			for(ll i=0;i<n;i++)
			{
				for(ll j=i;j<n;j++)
				{
					if(__gcd(a[i],a[j])!=1)
					{
						tt=1;
						f=1;
						break;
					}
				}
				if(tt==1)
					break;
			}
			if(f==0)
			{
				cout<<"pairwise coprime"<<endl;
			}
			else
			{
				cout<<"not coprime"<<endl;
			}
		}
}