#include <bits/stdc++.h>
#define all(x) (x).begin(), (x).end()
#define gc getchar()
#define pc(x) putchar(x)
template<typename T> void scan(T &x){x = 0;bool _=0;T c=gc;_=c==45;c=_?gc:c;while(c<48||c>57)c=gc;for(;c<48||c>57;c=gc);for(;c>47&&c<58;c=gc)x=(x<<3)+(x<<1)+(c&15);x=_?-x:x;}
template<typename T> void printn(T n){bool _=0;_=n<0;n=_?-n:n;char snum[65];int i=0;do{snum[i++]=char(n%10+48);n/= 10;}while(n);--i;if (_)pc(45);while(i>=0)pc(snum[i--]);}
template<typename First, typename ... Ints> void scan(First &arg, Ints&... rest){scan(arg);scan(rest...);}
template<typename T> void print(T n){printn(n);pc(10);}
template<typename First, typename ... Ints> void print(First arg, Ints... rest){printn(arg);pc(32);print(rest...);}

using namespace std;
using ll = long long;

int n;
ll a, t, cur;
#include <ext/pb_ds/assoc_container.hpp>
__gnu_pbds::gp_hash_table<ll, __gnu_pbds::null_type> mp;
bool no;

int main(){
	scan(n);
	while(n--){
		scan(a);
		t = __gcd(t, a);
		if(!no){
			for(ll i = 2; i*i <= a; i++){
				if(a%i == 0){
					if(mp.find(i) != mp.end()){
						no = 1;
						break;
					}
					mp.insert(i);
					while(a%i == 0)
						a /= i;
				}
			}
			if(a){
				if(mp.find(a) != mp.end()){
					no = 1;
					break;
				}
				mp.insert(a);
			}
		}
	}
	//pair first
	if(!no)
		puts("pairwise coprime");
	else if(t == 1)
		puts("setwise coprime");
	else
		puts("not coprime");
}