#include<bits/stdc++.h>
#include<iostream>
#include<queue>
#include<string>
#include<cmath>
#include<cstdio>
#include<cctype>
#include<cstring>
#include<iomanip>
#include<cstdlib>
#include<ctime>
#include<set>
#include<map>
#include<utility>
#include<vector>
#include<stack>
#include<sstream>
#include<algorithm>
using namespace std;
/****************************/
#define ll long long
#define vi vector<int>
#define pii pair<int,int>
#define vpii vector<pair<int,int> >
#define qi queue<int>
#define mii map<int,int>
#define msi map<string,int>
/****************************/
#define rep(i,n) for(ll i=0;i<(n);i++)
#define rep2(i,n) for(ll i=(n)-1;i>=0;i--)
#define rep3(i,a,n) for(ll i=(a);i<(n);i++)
#define mp make_pair
#define pb push_back
#define st first
#define nd second
#define pi 3.1415926535897932384626433832795
#define zero(n) memset(n,0,sizeof(n));
#define SZ(n) n.size()
#define ss st.st
#define sn st.nd 
#define mod 1000000007
/****************************/
using namespace std;
bool isprime[1000010];
int n;
int a[1000010];
bool cnt[1000010];
int main()
{
	memset(isprime,1,sizeof(isprime));
	zero(cnt);
	rep3(i,2,1e6+1)
	{
		if(isprime[i])
		{
			for(ll j=2*i;j<=1e6;j+=i)
			{
				isprime[j]=0;
			}
		}
	}
	cin>>n;
	cin>>a[0];
	int now=a[0];
	rep3(i,1,n)
	{
		cin>>a[i];
		now=__gcd(now,a[i]);
	}
	if(now!=1)
	{
		cout<<"not coprime";
		return 0;
	}
	now=0;
	rep(i,n)
	{
		now=a[i];
		rep3(j,2,1000)
		{
			if(!isprime[j]) continue;
			if(now%j==0&&now!=j)
			{
				if(cnt[j])
				{
					cout<<"setwise coprime";
					return 0;
				}
				cnt[j]=true;
			}
			while(now%j==0)
			{
				now/=j;
			}
		}
	}
	rep(i,n)
	{
		if(cnt[a[i]])
		{
			cout<<"setwise coprime";
			return 0;
		}
	}
	cout<<"pairwise coprime";
	return 0;
}