#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];
   ll prefix_gcd[n];
   prefix_gcd[0]=a[0];

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

ll count=0;
   for (int i = 0; i < n; ++i)
   {
     if(prefix_gcd[i]==1)
      count++;
   }

   if(prefix_gcd[n-1]==1)
   {
      if(count==1)
        cout<<"setwise coprime";
      else
        cout<<"pairwise coprime";


   }
   else
    cout<<"not coprime";



  
 


  

return 0;   
}