#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
bool visited[100005];
#define pb push_back 




ll ans[1000001];

int main()
{



int n;
cin>>n;

ll a[n],M=0;
ll g=0;
ll e=0,t=0,f=0,s=0;

for(auto &x:a)
{
	cin>>x;

	if(g==0)g=x;
	else
	{
		g=__gcd(g,x);
	}
	
	for(int i=2;i*i<=x;i++)
	{
		while(x%i==0)
		{
			ans[i]++;
			x/=i;
		}
		
	}
	
	if(x!=1)
		ans[x]++;
}



if(g!=1)
{
	cout<<"not coprime";
	return 0;
}


for(int i=2;i<=1000001;i++)
{
	if(ans[i]>1)
	{
		cout<<"setwise coprime";
		return 0;
	}
}

cout<<"pairwise coprime";

}
	


