#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define vi vector<ll>
#define pb push_back
#define ff first
#define ss second
#define inf 2e18
#define ull unsigned long long
#define pi acos(-1.0)
#define mod 1000000007
#define lop0(n) for(ll i=0;i<n;i++)
#define lopj(n) for(ll j=0;j<n;j++)
#define lop1(n) for(ll i=1;i<=n;i++)
#define all(v) v.begin(),v.end()
ll Set(ll N,ll pos){ return N=N | (1LL<<pos); }
ll reset(ll N,ll pos){ return N= N & ~(1LL<<pos); }
bool check(ll N,ll pos){ return (bool)(N & (1LL<<pos)); }
#define fastio ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)

main()
{
    ll n;
    cin>>n;
    vi v;
    lop0(n)
    {
        ll a;
        cin>>a;
        v.pb(a);
    }
    ll gcd=v[0],f=0;
    lop0(v.size())
    {
        gcd=__gcd(gcd,v[i]);
        if(i>0 and gcd>1) f=1;
    }
    ll gcdd=v[0],f1=0;
    for(ll i=0;i<v.size();i+=2)
    {
         gcdd=__gcd(gcdd,v[i]);
        if(i>0 and gcdd>1) f1=1;
    }
    if(gcd==1 and !f and gcdd==1 and !f1) cout<<"pairwise coprime"<<endl;
    else if(gcd==1) cout<<"setwise coprime"<<endl;
    else cout<<"not coprime"<<endl;
}

