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

int N;
int A[1000001];
bool walah = 1;
int x;

int solve1(int n) {
	if(n == N) {
		if(walah == 1) {
			return 1;
		} else { 
			return 0;
		}
	} else {
		for(int i = n + 1; i <= N; i++) {
			if(__gcd(A[n], A[i]) != 1) {
				walah = 0;
			}
		}
		solve1(n + 1);
	}
}

int solve2(int n) {
	if(n == N + 1) {
		if(x == 1) {
			return 1;
		} else {
			return 0;
		}
	} else {
		x = __gcd(x, A[n]);
		solve2(n + 1);
	}
}

int main() {
	cin >> N;
	
	for(int i = 1; i <= N; i++) {
		cin >> A[i];
	}
	x = A[1];
	if(solve1(1) == 1) {
		cout << "pairwise coprime" << endl;
	}
	else if(solve2(2) == 1) {
		cout << "setwise coprime" << endl;
	} else {
		cout << "not coprime" << endl;
	}
}