#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define pb push_back

#define ios ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);

int main()
{
	ios;
	int n,a,i,g,j;
	map<int ,int > m;
	int x=0;
	cin>>n;
	if(n>80000) x=1;
	for(j=0;j<n;j++)
	{
		cin>>a;
		if(j!=0) g= __gcd(a,g);
		else g=a;
//		cout<<a<<" "<<g<<" ";
		if(x!=1 && a%2==0)
		{
			if(m.find(2)!=m.end())
			x=1;
			else
			{
			while(a%2==0)
			a/=2;
			m[2]=1;
			}
		}
		if(x!=1)
		{
			for(i=3;i<=sqrt(a);i+=2)
			{
				if(a%i==0)
				{
					if(m.find(i)!=m.end())
					{
					x=1; break;}
					while(a%i==0) a/=i;
					m[i]=1;	
				}
			}
		}
	
	}
//	cout<<x<<" "<<g<<" ";
	if(x==0) cout<<"pairwise coprime";
	else if(g==1) cout<<"setwise coprime";
	else cout<<"not coprime";		
	return 0;
}