#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll MOD = 1e9 + 7;

ll gcd(ll a, ll b)
{
    ll t;
    while(b)
    {
        t=b;
        b=a%b;
        a=t;
    }
    return a;
}

ll inv(ll a, ll m)
{
    ll m0 = m; 
    ll y = 0, x = 1; 
  
    if (m == 1) 
      return 0; 
  
    while (a > 1) 
    {  
        ll q = a / m; 
        ll t = m; 
        m = a % m, a = t; 
        t = y; 
        y = x - q * y; 
        x = t; 
    } 
  
    if (x < 0) 
       x += m0; 
  
    return x; 
}

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

    ll n;
    cin>>n;
    vector<ll> a(n,0);
    for(ll i=0;i<n;i++)
        cin>>a[i];
        
    ll g = a[0];
    for(ll i=1;i<n;i++)
    {
        if(g<a[i])
            g = gcd(a[i],g);
        else
            g = gcd(g,a[i]);
    }

    if(g>1)
        cout<<"not coprime\n";
    else
    {
        ll prod = 1;
        for(ll i=0;i<n;i++)    
            prod = (prod*1ll*a[i])%MOD;

        ll lcm=a[0];
        for(ll i=0;i<n;i++)
        {
            if(lcm<a[i])
                lcm = (((lcm*1ll*a[i])%MOD)*1ll*inv(gcd(a[i],lcm),MOD))%MOD; 
        else
                lcm = (((lcm*1ll*a[i])%MOD)*1ll*inv(gcd(lcm,a[i]),MOD))%MOD; 
        }
        if(prod==lcm)
            cout<<"pairwise coprime";
        else
            cout<<"setwise coprime";
    }
    
    return 0;
}

