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

#define FAST ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);

#define MAXX 500005
#define INF INT_MAX

#define PI   3.14159265358979323846264338327950

#define PB push_back
#define PF push_front
#define F first
#define S second

#define fixx(n) fixed << setprecision(n)

#define ll 	 long long

#define mod  1000000007


bool p[MAXX];

int main()
{
	FAST;
	int n;
	cin >> n;
	int a[n+5];
	
	int m = a[0];
	bool ans = true;
	
	for(int i = 0; i < n; i ++){
		int a[i];
		cin >> a[i];
		if(i == 0){
			m = a[i];
		}
		else{
			m = __gcd(m, a[i]);
		}
		
		if(ans){
			for(int j = 2; j * j <= a[i]; j ++){
				if(a[i] % j == 0){
					int k = a[i] / j;
					if(p[j] || k ){
						ans = false;
					}
					p[j] = true;
					p[k] = true;
				}
			}
		}
		
	}
	
	
	if(m != 1){
		cout << "not coprime";
		return 0;
	}
	if( !ans){
		cout << "setwise coprime";
		return 0;
	}
	cout << "pairwise coprime";
	return 0;
}