#include <bits/stdc++.h>
using namespace std;
int n,val,v[1000001];

int main(){
	ios_base::sync_with_stdio(false);
	cout.tie(NULL);
	cin.tie(NULL);
	cin >> n;
	for(int i = 1 ; i <= n ; i += 1){
		int a;
		cin >> a;
		if(i == 1){
			val = a;
		}else{
			val = __gcd(val,a);
		}
		v[a] += 1;
	}
	bool tag = true;
	for(int i = 2 ; i <= 1000000 ; i += 1){
		if(v[i] == 0){
			continue;
		}
		if(v[i] > 1){
			tag = false;
			break;
		}
		for(int j = 2*i ; j <= 1000000 ; j += i){
			if(v[j]){
				tag = false;
				break;
			}
		}
	}
	if(tag){
		cout << "pairwise coprime" << endl;
	}else if(val == 1){
		cout << "setwise coprime" << endl;
	}else{
		cout << "not coprime" << endl;
	}
}