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

#define gcd(a,b)		__gcd(a,b)
#define lcm(a,b)		(a*b)/gcd(a,b)
#define ff              first
#define ss              second
#define int             long long
#define float			double
#define pb              emplace_back
#define mp              make_pair
#define pii             pair<int,int>
#define vi              vector<int>
#define vc				vector<char>
#define vb				vector<bool>
#define vf				vector<float>
#define vs				vector<string>
#define mii             map<int,int>
#define seti			set<int>
#define pqb             priority_queue<int>
#define pqs             priority_queue<int,vi,greater<int> >
#define setbits(x)      __builtin_popcountll(x)
#define zrobits(x)      __builtin_ctzll(x)
#define mod             1000000007
#define inf             INT64_MAX
#define ps(x,y)         fixed<<setprecision(y)<<x
#define mk(arr,n,type)  type *arr=new type[n];
#define w(x)            int x; cin>>x; while(x--)
#define all(x)			x.begin(),x.end()
#define digits(x)		floor(log10(x))+1
#define FIO				ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)

template<class T>
void printV(vector<T> a) {
	for (auto v : a)cout << v << " ";
}
template<class T>
void readV(vector<T>& a) {
	int n = a.size(); for (int i = 0 ; i < n ; i++)cin >> a[i];
}
template<class T>
void printA(T* a , int n) {
	for (int i = 0; i < n  ; i++)cout << a[i] << " ";
}
template<class T>
void readA(T* a , int n) {
	for (int i = 0 ; i < n ; i++)cin >> a[i];
}
auto clk = clock();
mt19937_64 rang(chrono::high_resolution_clock::now().time_since_epoch().count());
void run_time() {
	cout << endl;
	cout << "Time elapsed: " << (double)(clock() - clk) / CLOCKS_PER_SEC << endl;
	return;
}
template<typename T>
class dsu {
private:
	map<T, T> parent;
	map<T, int> size;

	T root( T x) {
		while (x != parent[x]) {
			parent[x] = parent[parent[x]];
			x = parent[x];
		}
		return x;
	}
public:
	dsu(vector<T> s) {
		for (T node : s) {
			parent[node] = node;
			size[node] = 0 ;
		}
	}
	bool find(T x , T y) {
		return root(x) == root(y);
	}
	void join(T x , T y) {
		T i = root(x);
		T j = root(y);
		if (i == j) {
			return;
		}
		if (size[i] < size[j]) {
			parent[i] = j;
			size[j] += size[i];
		}
		else {
			parent[j] = i;
			size[i] += size[j];
		}
	}
};
class BIT {
private:
	int* FT;
	int n;
public:
	void updateBIT(int index , int val) {
		index += 1;
		while (index <= n) {
			FT[index] += val;
			index += (index & (-index));
		}
	}

	int getSum(int index) {
		index += 1;
		int sum = 0 ;
		while (index > 0) {
			sum += FT[index];
			index -= (index & (-index));
		}
		return sum;
	}


	BIT(int* a , int v) {
		n = v ;
		FT = new int[n + 1];
		for (int i = 1 ; i <= n ; i++) {
			FT[i] = 0 ;
		}
		for (int i = 0 ; i < n ; i++) {
			updateBIT(i, a[i]);
		}
	}
};
int nCr(int n , int r ) {
	int p = 1, k = 1;

	if (n - r < r ) {
		r = n - r;
	}
	if (r != 0) {
		while (r != 0) {
			p *= n ;
			k *= r ;
			int m = __gcd(p, k);
			p /= m;
			k /= m;
			n--;
			r--;
		}
	}
	else {
		p = 1;
	}
	return p ;
}
int modPower(int x, int y , int p) {
	//Used to calculate (x^y)%p
	int res = 1;
	if (y == 0) {
		return 1;
	}

	x = x % p;
	if (x == 0) {
		return 0  ;
	}

	while (y > 0) {
		if (y & 1) {
			res = (res * x) % p;
		}

		y >>= 1;
		x = (x * x) % p;
	}
	return res ;
}
int p[1000002];
void prime_sieve(int* p) {
	for (int i = 3 ; i <= 1000000 ; i += 2) {
		p[i] = 1;
	}
	for (int i = 3 ; i <= 1000000 ; i += 2) {
		if (p[i] == 1) {
			for (int j = i * i ; j <= 1000000 ; j += i) {
				p[j] = 0 ;
			}
		}
	}
	p[0] = p[1] = 0 ;
	p[2] = 1;
	return;
}

int32_t main() {
	FIO;

	prime_sieve(p);

	int n ;
	cin >> n;

	mk(a, n, int);
	cin >> a[0];
	int gd = a[0];
	int countE = 0 ;
	bool flag = true;
	if (a[0] & 1) {
		if (p[a[0]] != 1) {
			flag = false;
		}
	}
	else {
		countE++;
	}
	for (int i = 1 ; i < n ; i++) {
		cin >> a[i];
		gd = gcd(a[i], gd);
		if (a[i] & 1) {
			if (p[a[i]] != 1) {
				flag = false;
			}
		}
		else {
			countE++;
		}
	}
	// cout << countE << " " << flag << '\n';
	if (countE <= 1 and flag == true ) {
		cout << "pairwise coprime";
	}
	else if (gd == 1) {
		cout << "setwise coprime";
	}
	else {
		cout << "not coprime";
	}


	return 0;
}
