#include<bits/stdc++.h>
using namespace std;
#define endl "\n"
typedef long long int lli;
#define optimize ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define vi vector<int>
#define pii pair<int,int>
#define mii map<int,int>
#define F first
#define S second
#define forn(i,n) for(int i = 0; i<n; i++)
#define forab(i,a,b) for(int i = a; i<b; i++)
#define forll(i,a,b) for(lli i = a; i<b; i++)
#define mp make_pair
#define pb push_back
#define sortv(v) sort(v.begin(), v.end())
#define debug(x) cout<<#x<<" : "<<x<<endl
#define all(x) x.begin(),x.end()
#define printv(v) for(auto it : v) cout<<it<<" ";cout<<endl;
#define prec(n) fixed<<setprecision(n)
const int mod1 = 1000000007;
const int mod2 = 998244353;
const int N = 1e5;

int main()
{
	optimize

	#ifndef ONLINE_JUDGE
	freopen("inputf.in", "r", stdin);
	freopen("outputf.in", "w", stdout);
	#endif

	int n;
	cin>>n;
	vi a(n);
	forn(i,n) cin>>a[i];

	string sw = "setwise coprime";
	string pw = "pairwise coprime";
	string np = "not coprime";

	vector<int>div(1000001,0);

	// sortv(a);
	int mx = *max_element(all(a));

	int swch = 1, pwch = 1;

	forn(i,n)
	{
		// if(a[i]%2 == 0)
		// {
		// 	int x = a[i]/2;
		// 	if(x != 2 && a[i]%x == 0)
		// 	{
		// 		div[x - 1]++;
		// 		if(div[x - 1] > 1)
		// 		{
		// 			pwch = 0;
		// 			break;
		// 		}
		// 	}

		// 	div[1]++;	
		// 	if(div[1]>1)
		// 	{
		// 		pwch = 0;
		// 		break;
		// 	}
		// }
		// else
		// {
			for(int j = 2; j*j<=a[i]; j++)
			{
				if(a[i]%j == 0)
				{
					div[j-1]++;

					int x = a[i]/j;
					if(x != j && a[i]%x == 0)
					{
						div[x - 1]++;
						if(div[x - 1] > 1)
						{
							pwch = 0;
							break;
						}
					}
					if(div[j-1]>1)
					{
						pwch = 0;
						break;
					}
				}

			}
		// }
	}

	int gd = a[0];
	forab(i,1,n)
	{
		gd = __gcd(gd, a[i]);
	}
	if(gd != 1) swch = 0;


	if(pwch)
		cout<<pw<<endl;
	else if(swch)
		cout<<sw<<endl;
	else
		cout<<np<<endl;

	return 0;
}