/*
Atcoder ABC177E
*/
#include <bits/stdc++.h>
using namespace std;

#define int long long

int n,a[1000005];
bool apr[1000005];

signed main()
{
	cin>>n;
	for(int i=1;i<=n;cin>>a[i++]);
	int gcd=a[1];
	for(int i=2;i<=n;i++)
		gcd = __gcd(gcd,a[i]);
	for(int i=1;i<=n;i++)
	{
		int tmp=a[i];
		for(int j=2;j*j<=a[i];j++)
			if(tmp%j==0)
			{
				if(apr[j])
					return cout<<(gcd==1 ? "setwise coprime\n" : "not coprime\n"), 0;
				while(tmp%j!=0)
					tmp /= j;
				apr[j] = 1;
			}
	}
	puts("pairwise coprime");
	
	return 0;
}