#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 = 1e6+5;
typedef pair<int,int> pii;

bool cnt[N];
const int MAXN =  1e6+5;

int spf[MAXN];
void sieve()
{
    spf[1] = 1;
    for (int i=2; i<MAXN; i++)
        spf[i] = i;
    for (int i=4; i<MAXN; i+=2)
        spf[i] = 2;

    for (int i=3; i*i<MAXN; i++)
    {

        if (spf[i] == i)
        {
            for (int j=i*i; j<MAXN; j+=i)
                if (spf[j]==j)
                    spf[j] = i;
        }
    }
}
bool getFactorization(int x)
{
    vector< pair<int,int> > ret;
    while (x != 1)
    {
        if(ret.size() && ret[ret.size() -1].first == spf[x])
        {
            ret[ret.size() -1].second++;
        }
        else
            ret.push_back({spf[x],1});
        x = x / spf[x];
    }
    for(pii x:ret)
    {
        if(cnt[x.first])
            return false;
    }
    for(pii x:ret)
    {
        cnt[x.first]= true;
    }
    return true;
}

bool check(vector<ll>&a)
{
    for(int i:a)
    {
        if(!getFactorization(i))
        {
            return false;
        }
    }
    return true;
}

void TEST_CASES(int cas)
{
    sieve();
    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))
    {
        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;
}



Measured memory_bytes: 14772