#include<bits/stdc++.h>
using namespace std;
#define  ft  ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define  ll  long long
#define  pi  pair<int,int>
#define  pb  push_back
#define  F   first
#define  S   second
#define  B   begin()
#define  E   end()
const int N=1e6+3;
//string s,p;
//vector<int>v;
//map<int,int>mp;
ll a[N];
int main()
{
    ft
    ll t,i,j,n,m,l,r,g=0;
    cin>>n;
    for(i=0;i<n;i++)
    {
        cin>>a[i];
        g=__gcd(g,a[i]);
    }
    vector<ll>v;
    int p[1002];
    memset(p,0,sizeof(p));
    for(i=3;i*i<=1000;i+=2)
    {
        for(j=i*i;j<=1000;j+=2*i)
        {
            p[j]=1;
        }
    }
    v.pb(2);
    for(i=3;i<=1000;i+=2)
    {
        if(p[i]==0)
        {
            v.pb(i);
        }
    }
    r=0;
    for(ll x:v)
    {
        l=0;
        for(j=0;j<n;j++)
        {
            if(a[j]%x==0)
            {
                l++;
            }
        }
        if(l>1)
        {
            r=1;
            break;
        }
    }
    if(r==0)
    {
        cout<<"pairwise coprime\n";
    }
    else if(g==1)
    {
        cout<<"setwise coprime\n";
    }
    else
    {
        cout<<"not coprime\n";
    }
    return 0;
}

