#include<bits/stdc++.h>
#include<bitset>
#include<string>
using namespace std;
#include <numeric> 
#define IOS ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
using pi=pair<long long,long long>;
#define pii 3.1415926536
#define binary
#define mod 1000000007
typedef long long ll;
typedef long double ld;
bool sortbysec(const pair<long long,long long> &a, 
              const pair<long long,long long> &b) 
{ 
    return (a.first < b.first); 
}
bool compare(const pair<pair<ll,ll>,ll> &a,const pair<pair<ll,ll>,ll>&b)
{
    if(a.first.first==b.first.first)return (a.first.second<b.first.second);
    return (a.first.first < b.first.first); 
}
 int lcm(int a, int b)  
 {  
    return (a*b)/__gcd(a, b);  
 }  
 int Kad(ll dp[],ll n)
{
  ll curr_max=0,maxx=INT_MIN;
  for(int i=0;i<n;i++)
  {
    curr_max=curr_max+dp[i];
    if(curr_max>maxx)
      maxx=curr_max;

    if(curr_max<0)
      curr_max=0;
   
  }

  return maxx;
}

/*void dfs(int u)
{
    vis[u]=true;
    //cout<<u<<" ";
    std::vector<ll> ::iterator i;
     for (i = g[u].begin(); i != g[u].end(); ++i) 
        if (!vis[*i]) 
            dfs(*i); 
    for(int i=1;i<g[u].size();i++)
    {
        if(!vis[g[u][i]])
        {
            dfs(i);
        }
    }
}*/
/*void build_tree(ll tree[],ll a[],ll start,ll end,ll node)
{
    if(start==end)
    {
        tree[node]=a[start];
        return;
    }
    int mid=(start+end)/2;
    build_tree(tree,a,start,mid,2*node);
    build_tree(tree,a,mid+1,end,2*node+1);
    tree[node]=min(tree[2*node],tree[2*node+1]);
}
ll query_tree(ll tree[],ll a[],ll qs,ll qe,ll start,ll end,ll node)
{
    if(start>=qs && end<=qe)
    {
        return tree[node];
    }
    if(start>qe || end<qs)
        return INT_MAX;
    int mid=(start+end)/2;
    int left_tree=query_tree(tree,a,qs,qe,start,mid,2*node);
    int right_tree=query_tree(tree,a,qs,qe,mid+1,end,2*node+1);

    return min(left_tree,right_tree);
}*/
ll dp[1000006];
int main()
{

 #ifndef ONLINE_JUDGE
  freopen("input.txt", "r", stdin);
  freopen("output.txt", "w", stdout);
  freopen("error.txt", "w", stderr);
  #endif  
  IOS;
  memset(dp,0,sizeof(dp));
  for(int i=0;i<1000006;i++)
  {
    dp[i]=i;
  }
  for(int i=2;i*i<1000006;i+=2)
    dp[i]=2;
  for(ll i=3;(i*i)<1000006;i++)
  {
    if(dp[i]==i)
    {
        for(ll j=i+i;j<1000006;j+=i)
        {
            if(dp[j]==j)
            dp[j]=i;
        }
    }
  }
/*  for(int i=2;i<=10;i++)
    cout<<dp[i]<<" ";
cout<<endl;*/
 
 ll n;
 cin>>n;
 ll a[n];
 ll flag=0;
 for (int i = 0; i < n; ++i)
 {
    cin>>a[i];
 }
/* for (int i = 0; i <10; ++i)
 {
     cout<<prime[i]<<" ";
 } 
 sort(a,a+n);*/
 set<int> s;
 map<int,set<int>> m;
 map<int,set<int>> ::iterator it;
 ll v[1000006];
 memset(v,0,sizeof(v));
 for(int i=0;i<n;i++)
 {
    ll f=a[i];
    while(f!=1)
    {
            m[a[i]].insert(dp[f]);
            //cout<<dp[f]<<" ";
            //cout<<j<<" "<<a[i]/j<<endl;
            //m[a[i]].insert(a[i]/j);
          //  s.insert(j);
            s.insert(dp[f]);
            v[dp[f]]++;
            f=f/dp[f];
    }
        
 }
 ll temp=0;

 for(it=m.begin();it!=m.end();it++)
 {
    if(it->second.size()==1)
        temp++;
 }
 if(temp==n)
 {
    if(s.size()==n)
    {
        cout<<"pairwise coprime"<<endl;
        return 0;
    }
 }
 flag=0;
 for(int i=1;i<1000006;i++)
 {
    if(v[i]>=n)
    {
        flag=1;
        break;
    }
 }  
 /*for (int i = 2; i < 10; ++i)
 {
     cout<<v[i]<<" ";
 }*/
 if(flag==1)
    cout<<"not coprime"<<endl;
else
    cout<<"setwise coprime"<<endl;
 

 
}
                                  
   

  