/*
  AUTHOR:SOURABH
  CREATED:27:08:20
*/
#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

#define ordered_set tree<pll , null_type, less< pll >, rb_tree_tag, tree_order_statistics_node_update>
#define ll long long int
#define ld long double
#define fi first
#define se second
#define pb push_back
#define pob pop_back
#define W while
#define fn(i,x) for(i=0;i<x;i++)
#define fs(i,s,x) for(i=s;i<x;i++)
#define fr(i,x) for(i=x;i>=0;i--)
#define fit(it,s) for(it=s.begin();it!=s.end();it++)
#define mp make_pair
#define pii pair<int,int>
#define pll pair<ll,ll>
#define vii vector<int>
#define vll vector<ll>
#define mii map<int,int>
#define mll map<ll,ll>
#define mod 1000000007
#define MAX 100005
#define M 32

using namespace std;
using namespace __gnu_pbds;

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);

    //freopen("input.txt","r",stdin);
    //freopen("out.txt","w",stdout);

    ll t,n,i,j,v,f,g;
    set<ll> b;
    t=1;
    //cin>>t;
    W(t--)
    {
        cin>>n;
        vll a(n);
        fn(i,n)
        cin>>a[i];
        fn(i,n)
        {
            v=a[i];
            for(j=2;j*j<=v;j++)
            {
                if(v%j==0)
                {
                    if(b.find(j)!=b.end())
                    {f=0;goto e;}
                    W(v%j==0)
                    v/=j;
                    b.insert(j);
                }
            }
            if(v>1)
                b.insert(v);
        }
        e:
        if(f)
            cout<<"pairwise coprime";
        else
        {
            g=0;
            fn(i,n)
            g=__gcd(g,a[i]);
            if(g==1)
                cout<<"setwise coprime";
            else
                cout<<"not coprime";
        }
    }
    return 0;
}





