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

#define rep(i, a, b) for(int i=a; i<=b; i++)
#define trav(a, x) for(auto& a : x)
#define all(x) begin(x), end(x)
#define sz(x) (int) x.size()
#define pb push_back
typedef long long ll;
typedef pair<int, int> pii;
typedef vector<int> vi;
const int MOD = 1e9+7;

int n, a;
vi vec;
map<int, bool> mp;

int main(){
  // freopen("input.txt", "r", stdin); 
  // freopen("output.txt", "w", stdout);
  cin.sync_with_stdio(0); cin.tie();
  cin.exceptions(cin.failbit);

  cin >> n;
  rep(i, 1, n){
  	cin >> a;
  	vec.pb(a);
  }
  int prv=__gcd(vec[0], vec[1]);
  rep(i, 2, n-1){
  	prv=__gcd(prv, vec[i]);
  }
  if(prv!=1){
  	cout << "not coprime"; return 0;
  }

  bool bad=false;
  trav(k, vec){
  	bool prime=true;
  	for(int i=2; i<=sqrt(k); i++){
  		if(k%i==0){
  			prime=false;
  			if(mp[i]){
				bad=true;
				break;
			}
			mp[i]=true;
		}
  		while(k%i==0) k/=i;
  	}
  	if(prime && k>1){
  		if(mp[k]){
				bad=true;
				break;
			}
			mp[k]=true;
  	}
  	if(bad) break;
  }
  if(bad) cout << "setwise coprime";
  else cout << "pairwise coprime";
}