#pragma GCC optimize ("O3")
#pragma GCC target ("sse4")
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#include <bits/stdc++.h>
using namespace std;
#define FAST  ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0)
#include <ext/pb_ds/assoc_container.hpp> 
#include <ext/pb_ds/tree_policy.hpp> 
using namespace __gnu_pbds; 
#define ordered_set tree<int, null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update> 
#define ll long long int 
#define ar array
#define pb push_back
#define fi(a,b) for(int i=a;i<(b);i++)
#define fj(a,b) for(int j=a;j<(b);j++)
#define fk(a,b) for(int k=a;k<(b);k++)
#define lb lower_bound
#define ub upper_bound
//hash base 177013



int main()
{
	FAST;
	//#ifndef ONLINE_JUDGE
	//	freopen("input.txt","r",stdin);
	//	freopen("output.txt","w",stdout);
	//#endif
	//ll testcase;
	//cin>>testcase;
	//while(testcase--)
	{
		//set wise
		int n;
		cin>>n;
		int a[n];
		fi(0,n) cin>>a[i];
		map<pair<int,int>,int> m;
		m[{n-1,n-1}]=a[n-1];
		int div=a[n-1];
		for(int i=n-2;i>=0;i--)
		{
			m[{i,n-1}]=__gcd(a[i],div);
			div=__gcd(a[i],div);
		}
		bool pairwise=true;
		fi(0,n)
		{
			if(i+1<n)
			{
				if(__gcd(a[i],m[{i+1,n-1}])!=1)
				{
					pairwise=false;
				}
			}
		}
		if(pairwise)
		{
			cout<<"pairwise coprime\n";
			return 0;
		}
		bool coprime=true;
		if(m[{0,n-1}]!=1)
		{
			coprime=false;
		}
		if(coprime)
		{
			cout<<"setwise coprime\n";
			return 0;
		}
		cout<<"not coprime\n";
	}
}
























