#include <bits/stdc++.h>

#define f(i, a, b, c) for(int i = a ; i < b ; i += c)
#define fr(i, a, b, c) for(int i = a ; i >= b ; i -= c)
#define fit(it, v) for(auto it = v.begin() ; it != v.end() ; ++it)
#define frit(it, v) for(auto it = v.rbegin() ; it != v.rend() ; ++it)
#define all(v) v.begin(), v.end()
#define allr(v) v.rbegin(), v.rend()
#define lli long long int
#define pb push_back
#define eb emplace_back
#define mp make_pair
#define NL '\n'
#define modn 1000000007
#define EPS 1e-9

using namespace std;

typedef vector< int > vi;
typedef vector< vi > vvi;
typedef vector< lli > vli;
typedef pair< int, int > ii;
typedef vector< ii > vii;
typedef vector< char > vc;
typedef vector< string > vs;
typedef vector< bool > vb;
typedef set< int > si;
typedef set< ii > sii;

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

	#ifdef LOCAL_TEST
		ifstream h("in");
		ofstream g("out");
		clock_t z = clock();
	#else
		#define h cin
		#define g cout
	#endif//LOCAL_TEST

	int n;
	h >> n;
	vi v(n);
	f(i, 0, n, 1)
		h >> v[i];
	int tmp = v[0];
	f(i, 0, n, 1)
		tmp = __gcd(tmp, v[i]);
	if (tmp != 1){
		g << "not coprime";
		return 0;
	}
	si s2;
	int fl2 = 0;
	f(i, 0, n, 1){
		if (s2.find(v[i]) == s2.end())
			s2.insert(v[i]);
		else{
			fl2 = 1;
			break;
		}
	}
	if (fl2 == 1){
		g << "setwise coprime";
		return 0;
	}
	vb vis(1000001), vis2(1000001);
	f(i, 0, n, 1)
		vis2[v[i]] = true;
	lli cnt = 0;
	int mx = *max_element(all(v));
	vi temp(1000001);
	iota(all(temp), 0);
	si s;
	f(i, 2, min(1001, mx + 1), 1){
		if (!vis[i]){
			f(j, i, mx + 1, i){
				vis[j] = true;
				if (vis2[j]){
					if (temp[j] % i == 0){
						cnt++;
						s.insert(i);
					}
					while(temp[j] % i)
						temp[j] /= i;
				}
			}
		}
	}
/*	fit(it, s)
		cerr << *it << NL;
	cerr << NL << cnt << NL;*/
	f(i, 1, 1000001, 1){
		if (vis2[i] && temp[i] > 1000){
			s.insert(i);
			cnt++;
		}
	}
	if (s.size() == cnt)
		g << "pairwise coprime";
	else
		g << "setwise coprime";

	#ifdef LOCAL_TEST
		cerr << "Time taken is: " << double(clock() - z) / CLOCKS_PER_SEC << NL;
		h.close();
		g.close();
	#endif//LOCAL_TEST
}
