#if __has_include("debug.h")
    #include "debug.h"
#else  
#include <bits/stdc++.h>
using namespace std;
#define d(...) 2;
#endif

#define int long long int

#define fast ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define endl "\n"      

#define all(c) (c).begin(),(c).end()
#define rall(c) (c).rbegin(),(c).rend()
#define ff first
#define ss second
#define eps 1e-10

#define gcd(a,b)            __gcd((a),(b))
#define lcm(a,b)            ((a*b)/gcd(a,b))

void solve();
const int N=1e6+10;
vector<int>f(N);


bool coprime()
{
	for(int i=2;i<=N;i++)
	{
		int cnt=0;
		for(int j=i*2;j<=N;j+=i)
		{
			cnt+=f[j];
		}
		if(cnt>=2)
		{
			return 0;
		}
	}
	return 1;
}

int32_t main()
{
    #ifdef DEBUG
	freopen("input.txt","r",stdin);
	freopen("output.txt","w",stdout);
    #endif 

    fast
    
    int t = 1;
	// cin>>t;
	
	while(t--)
	    solve();
	return 0;  
}

void solve()
{
	int i,j;
	int n;
	cin>>n;

	vector<int>a(n);

	for(i=0;i<n;i++)
	{
		cin>>a[i];
		f[a[i]]=1;
	}

	int gc=0;

	for(i=0;i<n;i++)
	{
		gc=gcd(a[i],gc);
	}

	if(gc>1)
	{
		cout<<"not coprime"<<endl;
	}
	else
	{
		bool flag=coprime();

		if(flag)
		{
			cout<<"pairwise coprime"<<endl;
		}
		else
		{
			cout<<"setwise coprime"<<endl;
		}
	}

}