
// Problem : E - Coprime
// Contest : AtCoder - AtCoder Beginner Contest 177
// URL : https://atcoder.jp/contests/abc177/tasks/abc177_e
// Memory Limit : 1024 MB
// Time Limit : 2000 ms
// Powered by CP Editor (https://github.com/cpeditor/cpeditor)

#include<bits/stdc++.h>
using namespace std;
const long long int  modu=1e9+7;
#define endl '\n'
#define ll long long int
#define vi vector<int>
#define vl vector<ll>
#define inp(x)  for(auto &t:x) cin>>t;
#define itr     vector<int>::iterator
#define debug(a) cout << #a << "=" << a << ' '<<endl;
#define out(x)  for(auto &t:x) cout<<t<<" "; cout<<endl;
#define ff first
#define ss second
#define pb push_back
#define initialize(a,v)  for(int i=0;i<a.size();++i) a[i]=v;
#define all(x) x.begin(),x.end()
#define mpt(mp) for(auto it=mp.begin();it!=mp.end();it++)
#define trav(x) for(int i=0;i<(int)x.size();++i)
#define mkp(a,b) make_pair(a,b)
#define sz(x)  (int)x.size()

int noofdig(int N)
{
	return floor(log10(N))+1;
}


ll f(ll a,ll b)
{
	return ((a*b)%modu) /__gcd(a,b);
}



void pre()
{

}
/*
for pairwise coprime : LCM (A1...An)= A1* A2 *A3* ....*An as gcd(a1,a2)=1; 
so LCM=a1*a2;





*/



void solve()
{

int n;
cin>>n;
vl a(n);
inp(a)
ll lcm=1,prod=1,g=a[0];

for(int i=0;i<n;++i)
{
	lcm=f(a[i],lcm);
	prod=(prod%modu*a[i]%modu)%modu;
	g=__gcd(g,a[i]);
}

if(lcm==prod)
{
	cout<<"pairwise coprime"<<endl;
}
else
if(g==1)
{
	cout<<"setwise coprime"<<endl;
}
else
{
	cout<<"not coprime"<<endl;
	
}



}



int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);

	int t=1;
	//cin>>t;
	while(t--)
	{
		solve();
	}
}
