#include <iostream>
#include <vector>
#include <algorithm>
#include <string.h>
#include <string>
#include <map>
#include <stdio.h>
#include <set>
using namespace std;

void setIn(string s){freopen(s.c_str(), "r", stdin);}
void setOut(string s){freopen(s.c_str(), "w", stdout);}
void unsyncIO(){cin.tie(0) -> sync_with_stdio(0);}
void setIO(string s = ""){
	unsyncIO();
	if(s.size()){
		setIn(s + ".in");
		setOut(s + ".out");
	}
}


#define ll long long
const ll mod = 1e9 + 7;
const int MX = 1000005;

int n, cnt[MX];
int v[MX];

int main(){
	setIO();
	cin >> n;
	for(int i = 0; i < n; i ++) cin >> v[i];

	if(n <= 80000){
		for(int i = 0; i < n; i ++){
			for(int j = 1; j * j <= v[i]; j ++) if(v[i] % j == 0){
				if(j != 1) cnt[j] ++;
				if(j != v[i] / j && v[i]/j != 1) cnt[v[i]/ j] ++;
			}
		}
		bool ye = true;
		for(int i = 0; i < MX;i ++)
			if(cnt[i] > 1) ye = false;
		if(ye) {
			cout << "pairwise coprime\n";
			return 0;
		}
	}

	int gg = v[0];
	for(int i= 1; i < n; i ++) gg = __gcd(gg, v[i]);
	if(gg == 1) cout << "setwise coprime\n";
else cout << "not coprime\n";
}