// E - Coprime
#include <bits/stdc++.h>
using namespace std;
#define MAX_A 1'000'001
int N;
vector<int> A, C(MAX_A, 0);

// 素数と個数を求める
vector<pair<int,int>> factorize(int n){
  vector<pair<int,int>> res;
  for(int i=2; i*i<=n; ++i){
    if (n%i) continue;
    res.emplace_back(i,0);
    while(n%i == 0){
      n /= i;
      res.back().second++;
    }
  }
  if(n != 1) res.emplace_back(n,1);
  return res;
}

string solve(){
	for(int a:A)
		for(auto p:factorize(a)) C[p.first]++;
	int max_c = 0;
	for(auto c:C) max_c = max(max_c, c);
	if(max_c <= 1) return "pairwise";
	else if(max_c == N-1) return "setwise";
	return "not";
}

int main(){
	cin>>N;
	A.resize(N); for(int i=0; i<N; ++i) cin>>A[i];
	cout<< solve() <<" coprime\n";
}
