#include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include <math.h>
#include <algorithm>
#include <string>
#include <string.h>
#include <vector>
#include <functional>
#include <queue>
#include <unordered_set>
#include <climits>
#include <set>
#include <list>
#include <cmath>
#include <map>

using namespace std;
typedef long long ll;

// https://ei1333.github.io/luzhiled/snippets/math/divisor.html
vector< int > divisor(int n) {
	vector< int > ret;
	for(int i = 1; i * i <= n; i++) {
		if(n % i == 0) {
			ret.push_back(i);
			if(i * i != n) ret.push_back(n / i);
		}
	}
	sort(begin(ret), end(ret));
	return (ret);
}

map< int64_t, int > prime_factor(int64_t n) {
	map< int64_t, int > ret;
	for(int64_t i = 2; i * i <= n; i++) {
		while(n % i == 0) {
			ret[i]++;
			n /= i;
		}
	}
	if(n != 1) ret[n] = 1;
	return ret;
}

int myGCD(int a, int b){
	if ( b == 0){
		return a;
	}
	
	return myGCD(b, a % b);
}

int main()
{
	int N;
	int A[1001001];
	cin >> N;
	for(int i = 0; i < N; i++){
		cin >> A[i];
	}
	
	bool s1[1001001];
	for(int i = 0; i < 1001001; i++){
		s1[i] = false;
	}
	
	int gcd = A[0];
	
	bool isPairwiseCoprime = true;
	for(int i = 0; i < N; i++){
		map<int, int> div = divisor(A[i]);
		for(auto it = div.begin(); it != div.end(); it++){
			int num = (*it).first;
			if(num == 1){
				continue;
			}
			if(s1[num]){
				isPairwiseCoprime = false;
			}else{
				s1[num] = true;
			}
		}
		
		if(gcd > 1){
			gcd = myGCD(gcd, A[i]);
		}
	}
	
	if(isPairwiseCoprime){
		cout << "pairwise coprime" << endl;
	}else if(gcd == 1){
		cout << "setwise coprime" << endl;
	}else{
		cout << "not coprime" << endl;
	}
	
	return 0;
}
