/* author:hellojim */
#include<bits/stdc++.h>
#include<iostream>
#include<string>
#include<cmath>
#include<cstdio>
#include<cctype>
#include<cstring>
#include<iomanip>
#include<cstdlib>
#include<ctime>
#include<set>
#include<map>
#include<utility>
#include<queue>
#include<vector>
#include<stack>
#include<sstream>
#include<algorithm>
#define forn(i,a,b)for(int i=(a),_b=(b);i<=_b;i++)
#define fore(i,b,a)for(int i=(b),_a=(a);i>=_a;i--)
#define rep(i,n)for(int i=0,_n=n;i<n;i++)
#define ll long long
#define pii pair<int,int>
#define vi vector<int>
#define vpii vector<pii>
#define m_p make_pair
#define re return
#define pb push_back
#define si set<int>
#define ld long double
#define X first
#define Y second
#define st string
#define ull unsigned long long
#define mod 1000000007
#define INF 1000000007
#define x1 XZVJDFADSPFOE
#define y1 GASDIJSLDAEJF
#define x2 DFDAJKVOHKWIW
#define y2 PSFSAODSXVNMQ
#define LLINF 0x3f3f3f3f3f3f3f3fLL
using namespace std;
inline void read(int &x)
{
	short negative=1;
    x=0;
    char c=getchar();
    while(c<'0' || c>'9')
    {
		if(c=='-')
			negative=-1;
		c=getchar();
	}
    while(c>='0' && c<='9')
        x=(x<<3)+(x<<1)+(c^48),c=getchar();
    x*=negative;
}
ll quickpower(ll n,ll k){
	ll ans=1;
	while(k){
		if(k%2){
			ans*=n;
			ans%=mod;
		}
		n*=n;
		n%=mod;
		k/=2;
	}
	return ans;
}
string int_to_string(int n)
{
	string s="";
	while(n)
	{
		int now=n%10;
		s+=now+'0';
		n/=10;
	}
	reverse(s.begin(),s.end());
	return s;
}
int string_to_int(string s)
{
	int n=0;
	rep(i,s.size())
	{
		n*=10;
		n+=s[i]-'0';
	}
	return n;
}
vector<int>pl;
bool pri[1001000];
int num[1001000];
int n;
int a[1001000];
int main()
{
	ios::sync_with_stdio(0);
	//think twice,code once
	for(int i=2;i<=1001000;i++)
	{
		if(!pri[i])
		{
			pl.pb(i);
			for(int j=i+i;j<=1001000;j+=i)
				pri[j]=1;
		}
	}
	//cout<<pl.size();
	//rep(i,pl.size())
	//	cout<<pl[i]<<" ";
	//cout<<endl;
	cin>>n;
	rep(i,n)cin>>a[i];
	ll ans=a[0];
	forn(i,1,n-1)
		ans=__gcd(ans,(ll)(a[i]));
	rep(i,n)
	{
		if(pri[a[i]]==0)num[a[i]]++;
		rep(j,200)
		{
			if(a[i]%pl[j]==0&&pl[j]!=a[i])
			{
				num[pl[j]]++;
				a[i]/=pl[j];
			}
		}
	}
	bool ok=0;
	forn(i,2,1000000)if(num[i]>=2)ok=1;
	if(!ok)
	{
		cout<<"pairwise coprime";
		return 0;
	}
	if(ans==1)
		cout<<"setwise coprime";
	else cout<<"not coprime";
	return 0;
}

