#include<iostream>
#include <cstddef>
#include<set>
#include<stack>
#include <deque>
#include<queue>
#include<utility>
#include<vector>
#include<map>
#include<cmath>
#include<cstring>
#include<bitset>
#include<cstdio>
#include<iomanip>
#include<algorithm>
#define  ll  long long
#define ull unsigned long long
#define  sl(a)  scanf("%lld",&a)
#define  si(a)  scanf("%d",&a)
#define mem(n,m) memset(n,m,sizeof(n))
#define PI acos(-1)
#define pb    push_back
#define pf    push_front
#define vll   vector<ll>
#define pll   pair<ll,ll>
#define mp  make_pair
#define vpll vector< pair <ll,ll> >
#define vplpll vector<pair<ll,pair<ll,ll> > >
#define mp make_pair
#define all(v) v.begin(),v.end()
#define S(X) ( (X) * (X) )
#define forab(i, a, b) for(i = a; i <= b; i++)
#define forn(i, n) for(i = 0; i < n; i++)
#define print(a,b) printf("Case %lld: %lld\n",a,b)
using namespace std;
ll powd(ll a,ll b){if(b==1){return a;}if(b%2==1){return powd(a,b-1)*a;}else{ll x=powd(a,b/2); return x*x;}}
ll powm(ll a,ll b,ll m){if(b==0){return 1;}if(b==1){return a%m;}if(b%2==1){return ((powm(a,b-1,m)%m)*(a%m))%m;}else{ll x=powm(a,b/2,m); return ((x%m)*(x%m))%m;}}
ll gcd(ll a,ll b){if(a==0){return b;}return gcd(b,a%b);}
ll a[1000006],b[1000006];
int main()
{
    ll n;
    sl(n);
    ll gc;
    ll x;
    for(ll i=0;i<n;i++)
    {
        sl(x);
        b[x]=1;
        if(i==0)
        {
            gc=x;
        }
        else
        {
            gc=__gcd(gc,x);
        }
    }
    if(gc!=1)
    {
        printf("not coprime\n");
    }
    else
    {
        ll q=0,ans=0;
        for(ll i=2;i<=1000000;i+=2)
        {
            if(b[i]==1)
                q++;
        }
        if(q>1)
        {
            ans=1;
        }
        else
        {
            q=0;
            for(ll i=3;i<=1000;i++)
            {
                if(a[i]==0)
                {
                    q=0;
                    for(ll j=i*i;j<=1000000;j+=(2*i))
                    {
                        a[j]=1;
                        if(b[j]==1)
                            q++;
                        if(q>1)
                            break;
                    }
                    if(q>1)
                        break;
                }
            }
            if(q>1)
            {
                ans=1;
            }
        }
        if(ans==1)
        {
            printf("setwise coprime\n");
        }
        else
        {
            printf("pairwise coprime\n");
        }
    }
    return 0;
}