#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
#define all(x) x.begin(),x.end()
#define endl '\n'
#define pb push_back
#define ff first
#define ss second
#define PI 3.1415926535897932384626
#define mod 1000000007
#define modd 998244353

void io() {
	ios::sync_with_stdio(0);
	cin.tie(0);
	#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
	#endif
}

int main() {
	io();
	
	int n;
	cin>>n;
	ll a;
	cin>>a;
	ll lcm = a, gcd = a, pro = a;
	for(int i=1;i<n;i++) {
		cin>>a;
		pro*=a;
		gcd = __gcd(gcd,a);
		lcm = lcm*a/__gcd(lcm,a);
	}
	if(lcm == pro) cout<<"pairwise coprime";
	else if(gcd == 1) cout<<"setwise coprime";
	else cout<<"not coprime";
	return 0;
}
