#include <bits/stdc++.h>
//#include <ext/pb_ds/assoc_container.hpp>
//using namespace __gnu_pbds;
using namespace std;
typedef long long ll;
typedef long double ld;
//typedef tree<int,null_type,less<int >,rb_tree_tag,tree_order_statistics_node_update>indexed_set;
template<class T1, class T2>
ostream &operator <<(ostream &os, pair<T1,T2>&p);
template <class T>
ostream &operator <<(ostream &os, vector<T>&v);
template <class T>
ostream &operator <<(ostream &os, set<T>&v);
template <class T1, class T2>
ostream &operator <<(ostream &os, map<T1,T2>&v);
#ifdef APURBA
#define HERE cout<<"here - "<<__LINE__<<"\n";
#define debug(args...) { string _s = #args; replace(_s.begin(), _s.end(), ',', ' '); stringstream _ss(_s); istream_iterator<string> _it(_ss); err(_it, args); }
void err(istream_iterator<string> it)
{
    cout<<endl;
}
template<typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args)
{
    cout << *it << " = " << a << " ";
    err(++it, args...);
}
#else
#define HERE
#define debug(args...)
#endif
//const ll mod = 1e9+7 ;
const int N = (1<<17);
typedef pair<int,int> pii;
const ll mod1 = 1e9+7;
const ll mod2 = 1e9+9;
const ll mod3 = 998244353;
const ll mod4 = 2000037719;
const ll mod5 = 1000020107;
ll mul(ll a ,ll b,ll mod)
{
    return a*b %mod;
}
ll bigmod(ll a, ll b,ll mod)
{
    a%=mod;
    ll ans =1;
    while(b>0)
    {
        if(b&1)
        {
            ans = (ans*a)%mod;
        }
        a= (a*a)%mod;
        b>>=1;
    }
    return ans;
}
ll lcm(ll a, ll b, ll mod)
{
    ll g = __gcd(a,b);
    ll ans = mul(a,b,mod);
    ans = mul(ans , bigmod(g,mod-2,mod),mod);
    return ans;
}
bool check(vector<ll>&a , ll mod)
{
    ll n= a.size();
    ll prod = 1;
    ll l = a[0];
    for(ll i=0;i<n;i++)
    {
        prod = mul(prod , a[i] , mod);
    }
    for(ll i=1;i<n;i++)
    {
        l = lcm(l,a[i],mod);
    }
    return l==prod;

}

void TEST_CASES(int cas)
{
    ll n;
    scanf("%lld",&n);
    vector<ll>a(n);
    ll g= 0;
    for(ll i=0;i<n;i++)
    {
        scanf("%lld",&a[i]);
        g= __gcd(g,a[i]);
    }
    if(g>1)
    {
        printf("not coprime\n");
        return;
    }
    if(check(a , mod1) && check(a,mod2) && check(a,mod3) && check(a,mod4) && check(a,mod5))
    {
        printf("pairwise coprime\n");
        return;
    }
    printf("setwise coprime\n");
}


/*

*/

int main()
{
    //freopen("input.txt","r",stdin);
    //freopen("output.txt","w",stdout);
    int t=1,cas=0;
    //scanf("%d",&t);
    while(t--)
    {
        TEST_CASES(++cas);
    }
    return 0;
}



template<class T1, class T2>
ostream &operator <<(ostream &os, pair<T1,T2>&p)
{
    os<<"{"<<p.first<<", "<<p.second<<"} ";
    return os;
}
template <class T>
ostream &operator <<(ostream &os, vector<T>&v)
{
    os<<"[ ";
    for(int i=0; i<v.size(); i++)
    {
        os<<v[i]<<" " ;
    }
    os<<" ]";
    return os;
}

template <class T>
ostream &operator <<(ostream &os, set<T>&v)
{
    os<<"[ ";
    for(T i:v)
    {
        os<<i<<" ";
    }
    os<<" ]";
    return os;
}
template <class T1, class T2>
ostream &operator <<(ostream &os, map<T1,T2>&v)
{
    for(auto i:v)
    {
        os<<"Key : "<<i.first<<" , Value : "<<i.second<<endl;
    }
    return os;
}

