#include<iostream>
#include<array>
#include<vector>
#include<string>
#include<cstring>
#include<set>
#include<unordered_set>
#include<map>
#include<unordered_map>
#include<queue>
#include<stack>
#include<deque>
#include<algorithm>
#include<cmath>
#include<climits>

using namespace std;
#define ll long long
#define ff first
#define ss second
#define e endl

ll LCM(ll a, ll b)  
  {  
     return (a*b)/__gcd(a, b);  
  }  

void solve() {
	ll n; cin >> n;
	ll a[n];
	for(ll i = 0;i < n;i++) cin >> a[i];
	ll m = 1e15;
	ll p = (a[0]*a[1]);
	ll x = LCM(a[0], a[1]), y = __gcd(a[0], a[1]);
	
	for(ll i = 2;i < n;i++){
	    x = LCM(x, a[i]);
	    p = (p*a[i]);
	    y = __gcd(y, a[i]);
	}
	if(p == x && y == 1) cout << "pairwise coprime";
	else if(y == 1) cout << "setwise coprime";
	else cout << "not coprime";
}

int main()
{
	//ll t; cin >> t; while (t--)
	solve();
	
}