#include<bits/stdc++.h>
#define ll long long int
using namespace std;
int main()
{
	int n;
	cin>>n;
	vector<int>a(n);
	for(int i=0;i<n;i++)
	{
		cin>>a[i];
	}
	int pg=0,sg=a[0],fp=0,fs=0;
	for(int i=1;i<n;i++)
	{
		pg=__gcd(a[i],a[i-1]);
		if(pg>1)
		fp=1;
		sg=__gcd(sg,a[i]);
	}
	if(sg>1)
	fs=1;
	if(fs==1 && fp==1)
	{
		cout<<"not coprime\n";
	}
	else if(fp==0)
	{
		cout<<"pairwise coprime\n";
	}
	else if(fs==0)
	{
		cout<<"setwise coprime\n";
	}
}
	
