#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define ALL(v) v.begin(), v.end()
typedef long long ll;

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

ll n;
ll arr[1000100];

void Eratosthenes(){
	for(int i = 0; i < 1000001; i++){
		arr[i] = 1;
	}
	for(int i = 2; i < sqrt(1000001); i++){
		if(arr[i]){
			for(int j = 0; i * (j + 2) < 1000001; j++){
				arr[i *(j + 2)] = 0;
			}
		}
	}
}

int main(){
  cin>>n;
  
  vector<ll> A(n);
  ll x,tmp;
  rep(i,n){
    cin>>x;
    A[i]=x;
    if(i==0) tmp=x;
    else tmp=gcd(tmp,x);
  }
  
  if(tmp>1){
    cout<<"not coprime"<<endl;
    return 0;
  }
  
  Eratosthenes();
  
  vector<ll> B;
  for(int i=2;i<=1000000;i++){
    if(arr[i]==1) B.push_back(i);
  }
  
  for(auto s:B){
    int cnt=0;
    rep(i,n){
      if(A[i]%s==0) cnt++;
      if(cnt>1){
        cout<<"setwise coprime"<<endl;
        return 0;
      }
    }
  }
  cout<<"pairwise coprime"<<endl;

  return 0;
}
