#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define lvector vector<ll>
#define cvector vector<char>
#define svector vector<string>
#define lque queue<ll>
#define lpque priority_queue<ll>
#define dlpque priority_queue<ll,lvector,greater<ll>>
#define P pair<ll,ll>
#define ALL(a) a.begin(),a.end()
#define RALL(a) a.rbegin(),a.rend()
#define rep(i,n) for(ll i=0; i<n; ++i)
#define print(a) cout << (a) << endl

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  ll n;cin>>n;
  lvector A(n);rep(i,n) cin>>A[i];
  if(n<=80000) {
    lvector div(1e3+1,0);
    ll val=__gcd(A[0],A[1]);
    rep(i,n) {
      if(A[i]%2==0) div[2]++;
      for(ll d=3;d*d<=A[i];d+=2) if(A[i]%d==0) div[d]++;
      if(i>=2) val=__gcd(val,A[i]);
    }
    ll m=*max_element(ALL(div));
    if(m==1) print("pairwise coprime");
    else {
      if(val==1) print("setwise coprime");
      else print("not coprime");
    }
  }
  else {
    ll val=__gcd(A[0],A[1]);
    for(ll i=2;i<n;++i) val=__gcd(val,A[i]);
    if(val==1) print("setwise coprime");
    else print("not coprime");
  }
  return 0;
}