#include<bits/stdc++.h>
using namespace std;
#define int long long int
#define ld long double
#define MOD 1000000007
#define endl "\n"
#define pb push_back
#define mp make_pair
#define ff first
#define ss second
#define all(var) (var).begin(), (var).end()
#define sz(x) (int)x.size()
#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> > >

vi primes;
int isp[1000005],a[1000006],b[1000006];
map<int,int> maa;

void hcek()
{
	for(int i=2;i<=1000000;i++)
	{
		if(!isp[i])
		{
			primes.pb(i);
			for(int j= i * i ; j <=1000000;j+=i)
			{
				isp[j] = i;
			}
		}
	}
}

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,i,j,x,y;
	cin >> n;
	for(i=0;i<n;i++)
	{
		cin >> a[i];
		b[i] = a[i];
	}
	
	hcek();
	
	for(i=0;i<n;i++)
	{
		while(b[i] != 1)
		{
			if(!isp[b[i]])
			{
				if(maa[b[i]])
				{
					goto Ga;
				}
				b[i] = 1;
				maa[b[i]] = 1;
			}
			else
			{
				x = isp[b[i]];
				if(maa[x])
				{
					goto Ga;
				}
				while(b[i] % x == 0)
				{
					b[i] /= x;
					maa[x] = 1;
				}
			}
		}
	}

	cout << "pairwise coprime";
	return 0;
	
	Ga:
	{
		;
	}

	x = a[0];

	for(i=1;i<n;i++)
	{
		x = __gcd(x, a[i]);
	}

	if(x == 1)
	{
		cout << "setwise coprime";
	}
	else
	{
		cout << "not coprime";
	}

	return 0;
}