#include <string>
#include <iostream>
#include <vector>
#include <algorithm>
#include <unordered_set>
#include <utility>
#include <cmath>
#include <stdlib.h> 
#include <stdio.h>
#include <iterator>
#include <chrono>
#include <iomanip>
#include <set>
#include <map>
#include <list>
#include <iterator>
#include <deque>
#include <stack>
#include <queue>
#include <fstream>
#include <limits>
#include <unordered_map>
#include <bitset>
#include <numeric>
#include <sstream>
#include <random>
#include <cassert>

using namespace std;
#define ffor(n) for(int i = 0; i < n; i++)
#define fffor(n) for(int j = 0; j < n; j++)
int INF = 1e9 + 7;

void generate_primes(vector <bool>& sieve, vector <int>& primes) {
	for (int i = 2; i <= 1e3; i++) {
		if (sieve[i]) {
			for (int j = i * i; j <= 1e6; j += i) sieve[j] = false;
		}
	}
	for (int i = 2; i < 1e6; i++) {
		if (sieve[i]) primes.push_back(i);
	}
}

int main(void) {
	cin.tie(0); ios::sync_with_stdio(0);

	int n;
	cin >> n;
	vector <int> v(n);
	ffor(n) cin >> v[i];

	vector <bool> sieve(1e6 + 5, true);
	vector <int> primes;
	generate_primes(sieve, primes);
	vector <bool> is_factor(1e6 + 5, false);

	bool pairwise_coprime = true;
	for (int e : v) {
		// decompose e to their prime factors
		for (auto p : primes) {
			if (e % p == 0) {
				if (is_factor[p]) {
					pairwise_coprime = false;
					break;
				}
				is_factor[p] = true;
			}
		}
		if (pairwise_coprime == false) break;
	}
	if (pairwise_coprime) {
		cout << "pairwise coprime";
	}
	else {
		int current = v[0];
		for (int i = 1; i < v.size(); i++) {
			current = gcd(current, v[i]);
		}
		if (current == 1) {
			cout << "setwise coprime";
		}
		else {
			cout << "not coprime";
		}
	}
}
	




/*
C:\Users\User\Desktop\comp_programming\final_straw_after_this_im_switching_to_vs_code\final_straw_after_this_im_switching_to_vs_code.cpp
*/