#include <iostream>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <algorithm>
#include <stack>
#include <queue>
#include <vector>
#include <map>
#include <set>
#include <unordered_set>
#include <unordered_map>
#define ll long long
#define fi first
#define se second
#define pb push_back
#define me memset
const int N = 1e6 + 10;
const int mod = 1e9 + 7;
const int INF = 0x3f3f3f3f;
using namespace std;
typedef pair<int,int> PII;
typedef pair<ll,ll> PLL;

inline int read()
{
	int X=0; bool flag=1; char ch=getchar();
	while(ch<'0'||ch>'9') {if(ch=='-') flag=0; ch=getchar();}
	while(ch>='0'&&ch<='9') {X=(X<<1)+(X<<3)+ch-'0'; ch=getchar();}
	if(flag) return X;
	return ~(X-1);
}

int n;
int a[N];
bool st[N];

bool check(int x){
	for(int i=2;i<=x/i;++i){
		if(x%i==0){
			if(st[i]) return false;
			while(x%i==0) x/=i;
			st[i]=true;
		}
	}
	if(x>1) st[x]=true;
	return true;
}


int main() {
    //ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
	n=read();
	bool flag=true;
	for(int i=1;i<=n;++i){
		a[i]=read();
		if(!check(a[i])) flag=false;
	}
	int gcd=a[1];
	for(int i=2;i<=n;++i){
		gcd=__gcd(gcd,a[i]);
	}

	if(flag) puts("pairwise coprime");
	else if(gcd==1) puts("setwise coprime");
	else puts("not coprime");

    return 0;
}