#include<bits/stdc++.h>
#define MOD 1000000007
#define MAX 1000000
using namespace std;
bool v[MAX+1];
bool criba[MAX+1];
bool check(int n)
{
	for(int i=2;i<=MAX;++i)
	{
		if(!criba[i])
		{
			long long j = i;
			int cnt = 0;
			while(j<=MAX)
			{
				criba[j] = true;
				if(v[j])cnt++;
				if(cnt==2)
					return false;
				j += 1LL*i;
			}
		}
	}
	return true;
}
int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	int n;
	cin>>n;
	int gcd;
	for(int i=1,x;i<=n;++i)
	{
		cin>>x;
		v[x] = true;
		if(i==1)
			gcd = x;
		else gcd = __gcd(gcd,x);	
	}
	if(check(n))
		cout<<"pairwise coprime"<<endl;
	else if(gcd==1)
		cout<<"setwise coprime"<<endl;
	else
		cout<<"not coprime"<<endl;
	return 0;
}