#include<bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef vector<int> vi;
typedef pair<int, int> pi;
typedef vector<long long> vl;
typedef pair<long long, long long> pl;
typedef vector<vector<long long>> matrix;

#define F 						first
#define S 						second
#define PB 						push_back
#define MP 						make_pair
#define all(c) 					c.begin(), c.end()
#define f(i,a,b) 				for(ll i=a; i<b; i++)
#define rep(i,n) 				f(i,0,n)
#define tr(c,i) 				for(typeof(c).begin() i = c.begin(); i != c.end(); i++)
#define present(c,x) 			(c.find(x) != c.end())	//for set and map
#define cpresent(c,x) 			(find(all(c),x) != c.end())	//for vectors
#define w(t)					ll t; cin>>t; while(t--)
#define epsilon 				1e-9
#define MOD						(ll)1e9

void doublade() {
	ios::sync_with_stdio(false); cin.tie(0); cout.precision(10);
	#ifndef ONLINE_JUDGE
		freopen("input.txt", "r", stdin);
		freopen("output.txt", "w", stdout);
	#endif
}

// ll gcd(ll a, ll b) {
// 	if(b==0) return a;
// 	else return(b, a%b);
// }

int main() {
	doublade();
	// w(t) {
		ll n;
		cin >> n;
		vl a(n);
		rep(i, n) {
			cin>>a[i];
		}
		ll g = a[0];
		f(i, 1, n) {
			g = __gcd(g, a[i]);
		}
		if(g==1) {
			bool flag = true;
			rep(i, n-1) {
				f(j, i+1, n) {
					if(__gcd(a[i], a[j])!=1) {
						flag = false;
						break;
					}
				}
			}
			
			if(flag) cout<<"pairwise coprime\n";
			else cout<<"setwise coprime\n";
		}else cout<<"not coprime\n";
	// }
	return 0;
}