#include<bits/stdc++.h>
using namespace std;
#define ll  long long int
#define fastio ios_base::sync_with_stdio(false); cin.tie(NULL);
#define M 1000000007



int main()
{

  #ifndef ONLINE_JUDGE


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

 #endif

  fastio;
  ll n;
  cin>>n;
  ll a[n];
  for (int i = 0; i < n; ++i)
   {
      cin>>a[i];
   } 

   ll x=a[0];

   for (int i = 1; i < n; ++i)
   {
      x=__gcd(x,a[i]);
   } 

   if(x==1)
    cout<<"setwise coprime";
  else
  {
    int flag=0;
     for (int i = 0; i < n; ++i)
   {
      for(int j=i+1;j<n;j++)
      {
        if(__gcd(a[i],a[j])!=1)
        {
          flag=1;
          break;
        }
      }
      if(flag)
        break;
   } 
   if(flag)
    cout<<"not coprime";
  else
    cout<<"pairwise coprime";


  }

  

return 0;   
}