#include<iostream>
#include<bits/stdc++.h>
using namespace std;
#define ll long long
bool ok=false;
//ll fct[1000004];
set<ll>st;
void f(ll x)
{
    if(ok)
     return;
     for(ll i=1;i*i<=x;i++)
     {
         if(x%i==0)
         {
             ll a=i;
             ll b=a/i;
             if(a==b)
             {
                 a=i;
                 b=1;
             }
             if(a!=1)
             {
                 if(st.find(a)!=st.end())
                 {
                     ok=true;
                     return;
                 }
                 else
                 st.insert(a);
             }
             
             if(b!=1)
             {
                 if(st.find(b)!=st.end())
                 {
                     ok=true;
                     return;
                 }
                 else
                 st.insert(b);
             }
             
         }
     }
}


int main()
{
   ll n;
   cin>>n;
   vector<ll>v(n);
   for(ll i=0;i<n;i++)
   cin>>v[i];
   ll gcd=v[0];
   f(v[0]);
   for(ll i=1;i<n;i++)
   {
       gcd=__gcd(gcd,v[i]);
       f(v[i]);
       
   }
   if(!ok)
   cout<<"pairwise coprime"<<endl;
   else if(gcd==1)
   cout<<"setwise coprime"<<endl;
   else
   cout<<"not coprime"<<endl;
   
   
   
   
   
}