#include <bits/stdc++.h>
typedef long long int ll;
using namespace std;
#define P 1000000007
#define rep(i,n) for(i=0;i<n;++i)
#define re(i,a,n) for(i=a;i<=n;++i)
#define repr(i,a,n) for(i=a;i>=n;--i)
#define pb push_back
#define mp make_pair
#define fi first
#define se second


ll binpow(ll x, ll y, ll p)
{
    ll res = 1;
    x = x % p;
   while (y > 0)
    {
        if (y & 1)
            res = (res*x) % p;
        y = y>>1;
        x = (x*x) % p;
    }
    return res;
}
ll modInverse(ll n, ll p)
{
    return binpow(n, p-2, p);
}

vector<ll> used;
vector<vector<ll>> adj;
ll res;

void dfs(ll u)
{
      res++;
      used[u]=1;
      for(auto v:adj[u])
      {
            if(!used[v]) dfs(v);
      }
}

int main() 
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    ll m,n,i,f=0,j,ans=0,k,x,r,l,t;
    cin >> n;
    m=1e6+1;
    ll MAXN=m;
    ll spf[m];
    spf[0]=spf[1]=1;
    spf[2]=2;
    for ( i=2; i<MAXN; i++) 
  
        // marking smallest prime factor for every 
        // number to be itself. 
        spf[i] = i; 
  
    // separately marking spf for every even 
    // number as 2 
    for ( i=4; i<MAXN; i+=2) 
        spf[i] = 2; 
  
    for ( i=3; i*i<MAXN; i++) 
    { 
        // checking if i is prime 
        if (spf[i] == i) 
        { 
            // marking SPF for all numbers divisible by i 
            for ( j=i*i; j<MAXN; j+=i) 
  
                // marking spf[j] if it is not  
                // previously marked 
                if (spf[j]==j) 
                    spf[j] = i; 
        } 
    }
    vector<ll> a(n);
    
    rep(i,n)
    {
          cin >> a[i];
          
    }
    t=a[0];
    for(i=1;i<n;++i) t=__gcd(t,a[i]);
    set<ll> s;
    f=0;
    rep(i,n)
    {
          ll temp=a[i];
          while(temp!=1)
          {
                if(s.find(spf[temp])!=s.end())
                {
                      f=1;
                      break;
                }
                s.insert(spf[temp]);
                temp/=spf[temp];
                
          }
          if(f) break ;
    }
    if(f==0) cout << "pairwise coprime" ;
    else
    {
          if(t==1) cout << "setwise coprime" ;
          else cout << "not coprime" ;
    }
    
    return 0;
}