#include <bits/stdc++.h>
#include<set>
#define ll long long
#include <string>
using namespace std;
void fastio()
{
	#ifndef ONLINE_JUDGE
    // for getting input from input.txt
    freopen("input.txt", "r", stdin);
    // for writing output to output.txt
    freopen("output.txt", "w", stdout);
    #endif
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);

}
int main()
{
	fastio();
	string s;
	ll int n;
	cin>>n;
	ll int a[n],i,j;
	for(i=0;i<n;i++)
	{
		cin>>a[i];
	}
	ll int g=__gcd(a[0],a[1]);
	for(i=2;i<n;i++)
	{
		g=__gcd(g,a[i]);
	}
	if(g>1)
	{
		cout<<"not coprime"<<endl;
		return 0;
	}
	map<ll  int ,ll int > m;
	for(i=0;i<n;i++)
	{
		ll int d=a[i];
		for(j=2;j*j<=d;j++)
		{

			if(d%j==0)
			{
				m[j]++;
				while(d%j==0)
				{
					d=d/j;

				}
			}
		}

	}
	ll int fl=0;
	for(auto i: m)
	{
		if (i.second>1)
		{
			fl=1;
			break;
		}
	}
	if (fl==1)
		cout<<"setwise coprime"<<endl;
	else
		cout<<"pairwise coprime"<<endl;

}