#include<bits/stdc++.h>
  
#define lol long long
#define gcd(x,y) __gcd(x,y)
#define mt make_tuple
#define mp make_pair
#define fi first
#define se second
#define fixed(x) fixed<<setprecision(x)
using namespace std;
using pii=pair<int,int>;
template <class A, class B> inline bool chmax(A &a, const B &b) { return b > a && (a = b, true); }
template <class A, class B> inline bool chmin(A &a, const B &b) { return b < a && (a = b, true); }
template <class A> inline A abs(A &a) { return (a < 0 ? -a : a); }
bool inLine(int x,int y,int mx,int my){return (x>=0&&y>=0&&x<mx&&y<my);}
const lol inf=(1LL<<62);
const lol MOD=(1e9)+7;
const lol mod=998244353;
const int dx[]={1,0,-1,0,1,1,-1,-1};
const int dy[]={0,1,0,-1,1,-1,1,-1};
signed main(){
  cin.tie(0);
  ios::sync_with_stdio(false);
  int n;
  cin>>n;
  vector<int> a(n);
  for(int i=0;i<n;i++) cin >>a[i];
  int g=a[0];
  for(int i=1;i<n;i++){
    g=gcd(g,a[i]);
  }
  if(g!=1){
    cout <<"not coprime\n";
    return (0);
  }
  set<int> s;
  bool yes=true;
  for(int i=0;i<n;i++){
    int tmp=a[i];
    for(int j=2;j*j<=tmp;j++){
      if(a[i]%j==0){
        if(s.find(j)!=s.end()){
          yes=false;
        }
        s.insert(j);
      }
      while(a[i]%j==0){
        a[i]/=j;
      }
    }
    if(a[i]!=1){
      if(s.find(a[i])!=s.end()){
        yes=false;
      }
      s.insert(a[i]);
    }
  }
  if(!yes) cout <<"setwise coprime\n";
  else cout <<"pairwise coprime\n";
  return(0);
}