#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--)
	{
		int n;
		cin>>n;
		int a[n];
		vector<int> m(1000000+2);
		fi(0,n) 
		{
			cin>>a[i];
			m[a[i]]++;
		}
		bool pw=true;
		for(ll i=2;i<=1000000;i++)
		{
			int count=0;
			if(i*i>1000000) break;
			for(ll j=i;j<=1000000;j+=i)
			{
				count+=m[j];
			}
			if(count>1)
			{
				pw=false;
				break;
			}
		}
		if(pw)
		{
			cout<<"pairwise coprime\n";
			return 0;
		}
		
		int temp=a[0];
		fi(1,n)
		{
			temp=__gcd(temp,a[i]);
		}
		if(temp==1)
		{
			cout<<"setwise coprime\n";
		}
		else
		{
			cout<<"not coprime\n";
		}
		
		
	}
}
