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

#define ll              long long int
#define scan(any)       for(auto &i:any) cin>>i;
#define print(any)      for(auto i:any) cout<<i<<" "; 
#define endl            '\n'
#define pb push_back
#define vll vector<ll> 
#define f(i,x,y)  for(i=x;i<y;i++)
#define INF     LLONG_MAX
#define fast    ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define s(x) sort(x.begin(),x.end())
#define all(v) v.begin(),v.end()
#define p2(n,x)    cout << fixed << setprecision(x) <<n<<endl; 
#define pll    pair<ll,ll> 
#define ff first
#define ss second
#define blt(x)   __builtin_popcount(x)
bool fun(ll n,map<ll,ll> &m)
{
    ll i,j,k;
    for(i=2;i<(int)sqrt(n)+1;i++)
    {
        if(n%i==0)
        {
            if(m[i] || m[n/i])
                return false;
            m[i]++;
            m[n/i]++;
        }
    }
    if(m[n])
        return false;
    return true;
}
void solve()
{
    ll i,j,k,n;
    cin>>n;
    vll v(n);
    scan(v);
    map<ll,ll> m;
    ll u=0;
    for(i=n-1;i>=0;i--)
    {
        if(!fun(v[i],m))
        {
            u=1;
            break;
        }
    }
    if(!u)
    {
        cout<<"pairwise coprime";
        return ;
    }
    ll g=__gcd(v[0],v[1]);
    f(i,2,n)
    {
        g=__gcd(g,v[i]);
        
    }
     if(g!=1)
        {
            cout<<"not coprime";
            return ;
        }
    cout<<"setwise coprime";

}

int main()
{
   
    fast
    ll t = 1;

    

    while(t--)
    solve();
    
    return 0;
}