#include <bits/stdc++.h>
using namespace std;
#define int long long int
#define MOD 1000000007
#define endl "\n"
#define pb push_back
#define mp make_pair
#define ff first
#define all(c) (c).begin(),(c).end()
#define ss second
#define MAXX 9000000000000000000
#define pii pair<int,int>
#define vi vector<int>
#define vvi vector<vector<int> >
#define vpi vector<pair<int,int> > 
#define vvpi vector<vector<pair<int,int> > >
#define Inp(a,n) for(int i=0;i<n;i++)cin>>a[i]
#define Out(a,n,ch) for(int i=0;i<n;i++)cout<<a[i]<<ch;cout<<endl;
 
int a[200005],pref[200005]={0};

int __lcm(int x, int y)
{
	return (x*y)/__gcd(x,y);
}
int32_t main() 
{
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	
	#ifndef ONLINE_JUDGE
		freopen("input.txt", "r", stdin);
		freopen("output.txt", "w", stdout);
	#endif
	
	
	int n;
	cin>>n;
	for(int i=0;i<n;i++)
		cin>>a[i];

	int lcm= __lcm(a[0],a[1]),prod=a[0]*a[1],pw=1;
	for(int i=2;i<n;i++)
	{
		prod *= a[i];
		prod%=MOD;
		lcm%=MOD;
		if(__lcm(lcm,a[i])%MOD!=prod)
		{
			pw=0;
			break;
		}
	}
	int gcd=a[0];
	for(int i=1;i<n;i++)
	{
		gcd = __gcd(gcd,a[i]);
	}
	if(pw)
	{
		cout<<"pairwise coprime"<<endl;
	}
	else if(gcd==1)
		cout<<"setwise coprime"<<endl;
	else
		cout<<"not coprime"<<endl;
	
	return 0;
}