#include <bits/stdc++.h>
using namespace std;
#define int long long
#define M 1000000007

int  seive_of_eras(int a,int b,vector<int>c){
vector<int>v;
vector<int>arr(b+1,1);
 for(int i=2;i*i<=b;i++){
      if(arr[i]==1){
          for(int j=i*i;j<=b;j+=i)
          arr[j]=0;}}
 for(int i=0;i<c.size();i++)
 if(arr[c[i]]==0)
  c[i]=0;
  int cnt=0;
  for(int i=0;i<c.size();i++)
  if(c[i]!=0)
  cnt++;
  return cnt;

    


 
}
int gcd_array(int n,vector<int>arr){
    int result=arr[0];
    for(int i=0;i<n;i++)
    result=__gcd(result,arr[i]);
    return result;
 }
int32_t main(){
   
   int n;
   cin>>n;
   vector<int>a(n);
   int mini=M,maxi=0;
   for(int i=0;i<n;i++){
   cin>>a[i];
   mini=min(a[i],mini);
   maxi=max(a[i],maxi);}
   int cnt=seive_of_eras(mini,maxi,a);
   if(cnt>=n-1)
   cout<<"pairwise coprime"<<endl;
   else if(gcd_array(n,a)==1)
   cout<<"setwise coprime"<<endl;
   else
   {
       cout<<"not coprime"<<endl;
   }
   
   
   


   
    return 0;
}