#include<bits/stdc++.h>
using namespace std;
#define ull unsigned long long
#define mp make_pair
#define ll long long
#define pb push_back

void solve()
{

  ll n;
  cin>>n;

  vector<ll>v(n);

  ll i,j;
  set<ll>s;
  for(i=0;i<n;i++){cin>>v[i]; s.insert(v[i]);}

  map<int,int>m;



   for(auto it =s.begin();it!=s.end();it++)
   {
       int val =  *it;

       for(j=2;j*j<=val;j++)
       {
           if(val%j==0)
           {
               m[j]++;
               while(val%j==0)val = val/j;
           }
       }
   }
   bool f=1;
   int m = s.size();
   if(m!=n)f=0;

   bool t=1;
   for(auto it=m.begin();it!=m.end();it++)
   {
       if(it->second > 1)
       {
           f = 0;
       }
       if(it->second == s.size())
       t=0;

   }

   if(f==1)
   {
       cout<<"pairwise coprime";
       return;
   }

   if(t==1)
   {
       cout<<"setwise coprime";
       return;
   }
   cout<<"not coprime";



  return;
}

int main()
{

  int t = 1;
  //cin>>t;

  while(t--)
    solve();

  return 0;
}
