#include<bits/stdc++.h>
typedef long long ll;
#define F(i,L,R) for (ll i = L; i < R; i++)
#define fi first
#define se second
#define pb push_back
#define mp make_pair
#define MOD 1000000007
#define re(x) scanf("%lld",&x)
using namespace std;

int main(){
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);

  ll n;
  cin>>n;
  ll a[n];
  F(i,0,n) cin>>a[i];
  ll pr = a[0], gcd = a[0];
  ll lcm = a[0];
  F(i,1,n){
  	lcm = (a[i] * lcm)/(__gcd(a[i], lcm));
  	pr = pr*a[i];
  	gcd = __gcd(gcd, a[i]);
  }
  //cout<<lcm<<" "<<pr<<endl;
  if(lcm == pr) cout<<"pairwise coprime";
  else if(gcd == 1) cout<<"setwise coprime";
  else cout<<"not coprime";





  
  return 0;
}