#include<bits/stdc++.h>
// #include <ext/pb_ds/assoc_container.hpp>
// #include <ext/pb_ds/tree_policy.hpp>
 
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,tune=native")
#pragma GCC optimize("-ffloat-store")
 
#define int  long long
#define rep(i,begin,end) for(__typeof(end)i=(begin)-((begin)>(end));i!=(end)-((begin)>(end));i+=1-2*((begin)>(end)))
#define F first
#define S second
#define sz(x) ((int)x.size())
#define pb push_back
#define pf push_front
#define eb emplace_back
#define all(v) (v).begin(), (v).end()
#define mod 1000000007
#define what_is(x) cerr << #x << " is " << x <<"\n";
#define sortA(v) sort(v.begin(), v.end())
#define sortD(v) sort(v.rbegin(), v.rend())
#define PI 3.14159265358979323846
#define vout(a) for(auto x:a) cout<<x<<" ";
#define INF 1000000000000000 //1e16
 
// #define ordered_set tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update>
 
 
// using namespace __gnu_pbds;
using namespace std;
 
using ll  = long long;
using vi  = vector<int>;
using vvi = vector<vi>;
using pii = pair<int,int>;
using vii = vector<pii>;
using mi  = multiset<int>;
using mii = multiset<pii>;
 
int lcm(int a,int b) {return (a*(b/__gcd(a,b)));}

vi spf(1000001,0);

void solve()
{
    int n,m,t,i,k,r,l,s,u,v,w,j,pos,sum=0,flag=0,count=0;
    string S,T; 
    int d;
    cin>>n;
    vi a(n);
    rep(i,0,n) cin>>a[i];
    int gcd=a[0];
    bool setwise=false;
    rep(i,0,n)
    {
        gcd=__gcd(a[i],gcd);
    }
    if(gcd==1) setwise=true;
    map<int,int> cnt;
    bool pairwise=true;
    rep(i,0,n) 
    {
        cnt[spf[a[i]]]++;
        if(cnt[spf[a[i]]]>1&&a[i]!=1) pairwise=false;
    }
    if(pairwise) cout<<"pairwise coprime";
    else if(!pairwise&&setwise) cout<<"setwise coprime";
    else cout<<"not coprime";
}


signed main()
{
    #ifndef ONLINE_JUDGE 
       freopen("input.txt","r",stdin);
       freopen("output.txt","w",stdout);
    #endif
    ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
    int t=1;
    // cin>>t;
    for(int i=1;i<1000001;i++)
    {
        if(i==1) {spf[i]=1;continue;}
        if(!spf[i])
        {
            spf[i]=i;
            for(int j=i*i;j<1000001;j+=i) spf[j]=i;
        }
    }
    while(t--)
    {
        solve();
        if(t)cout<<"\n";
    }
    return 0;
}