#include <bits/stdc++.h> 
#include<cmath>
#include<string>
#define pb push_back
#define x first
#define y second
#define fast ios::sync_with_stdio(0),cin.tie(0),cout.tie(0)
#define all(x) x.begin(),x.end()
#define int long long
using namespace std;
 
void __print(int x) {cerr << x;}
void __print(long x) {cerr << x;}
//void __print(long long x) {cerr << x;}
void __print(unsigned x) {cerr << x;}
void __print(unsigned long x) {cerr << x;}
void __print(unsigned long long x) {cerr << x;}
void __print(float x) {cerr << x;}
void __print(double x) {cerr << x;}
void __print(long double x) {cerr << x;}
void __print(char x) {cerr << '\'' << x << '\'';}
void __print(const char *x) {cerr << '\"' << x << '\"';}
void __print(const string &x) {cerr << '\"' << x << '\"';}
void __print(bool x) {cerr << (x ? "true" : "false");}
 
template<typename T, typename V>
void __print(const pair<T, V> &x) {cerr << '{'; __print(x.first); cerr << ','; __print(x.second); cerr << '}';}
template<typename T>
void __print(const T &x) {int f = 0; cerr << '{'; for (auto &i: x) cerr << (f++ ? "," : ""), __print(i); cerr << "}";}
void _print() {cerr << "]\n";}
template <typename T, typename... V>
void _print(T t, V... v) {__print(t); if (sizeof...(v)) cerr << ", "; _print(v...);}
#ifndef ONLINE_JUDGE
#define debug(x...) cerr << "[" << #x << "] = ["; _print(x)
#else
#define debug(x...)
#endif
 
// look for  all edge cases
//search for a pattern

const int nax = 1e6+2;
bool prime[nax];


signed main() {    
	ios::sync_with_stdio(0);
	cout.tie(0);
	cin.tie(0);
	
	int n;
	cin  >> n;
	unordered_set<int> s;
	map<int,int> m;
	vector<int> v(n);
	cin >> v[0];
	int val = v[0];
	s.insert(v[0]);
	m[v[0]] += 1;
	for(int i =1 ; i < n;i++){
		cin >> v[i];
		val = __gcd(val , v[i]);
		s.insert(v[i]);
		m[v[i]] += 1;
	}
	 
	if(val != 1){
		cout<<"not coprime";
		return 0;
	}
	//if((int)s.size() != n){
		//debug("hi");
		//cout<<"setwise coprime";
		//return 0;
	//}
	
	
	
	for(int i =1 ; i < nax ; i++){
		prime[i] = true;
	}
	
	bool ok = true;
	for(int i = 2 ; i < nax; i++){
		int cnt = 0;
		if(prime[i] == true){
			if(s.find(i) != s.end()){
				cnt += m[i];
			}
			for(int j = i * i ; j < nax ; j += i ){
				prime[j] = false;
				if(s.find(j) != s.end()){
					cnt += m[j];
				}
			}
		}
		
		if(cnt > 1)	{
			//debug("hi");
			ok = false;
			break;
		}
	} 
	
	if(ok){
		cout<<"pairwise coprime";
	}
	else{
		cout<<"setwise coprime";
	}
	 
	return 0;
}
