#include <bits/stdc++.h>
#define ll long long int
#define ul unsigned long long int
using namespace std;
ll mp[1000009];
ll cnt[1000009];
vector<ll>prime_check[1000009];
ll ase_naki_nai[1000009];
ll arra[1000009];
void seive(ll n)
{
  ll i,j,k,l,p,q,r,s,t,u,v;
  for(i=2;i<=n;i++)
  {
    if(mp[i]==0)
    {
      for(j=i+i;j<=n;j=j+i)
        mp[j]=1;	
    }	
  }	
}
int main()
{
  ll i,j,k,p,q,r,s,t,u=1,v,w,x,y,z,n,m,top=0;
  p=1000009;
  seive(p);
  cin>>n;
  for(i=0;i<n;i++)
  {
    scanf("%lld",&arra[i]);	
  }
  for(i=0;i<n;i++)
  {
    if(mp[arra[i]]==0){
     prime_check[i].push_back(arra[i]);
     continue;
   }
     m=arra[i];	
    for(j=2;j<=m;j++)
    {
      if(m%j==0)
      {
        while(m%j==0)
         m=m/j;
        //cout<<m<<'\n';
        prime_check[i].push_back(j); 
        if(mp[m]==0&&m>1)
        {
          prime_check[i].push_back(m);
          m=1;
          break;	
        }	
      }	
    }
    if(m>1)
     prime_check[i].push_back(m);	
  }
 // cout<<prime_check[0][1]<<'\n';
  for(i=0;i<n;i++)
  {
    x=arra[i];
    y=prime_check[i].size();
    for(j=0;j<y;j++)
    {
     // cout<<prime_check[i][j]<<" ";	
      if(ase_naki_nai[prime_check[i][j]]==0)
        ase_naki_nai[prime_check[i][j]]=1;
       else if(ase_naki_nai[prime_check[i][j]]==1)
       {
         u=-1;	
       } 	
    }
    cout<<'\n';
   	
  }
  if(u==1)
  {
   cout<<"pairwise coprime"<<'\n';	
  }
  else
  {
    z=arra[0];	
     for(i=1;i<n;i++)
     z=__gcd(z,arra[i]);
    if(z==1)
     cout<<"setwise coprime"<<'\n';
    else
    cout<<"not coprime"<<'\n';   	
  }
  	
}