#include<bits/stdc++.h>
using namespace std;
#define ll long long int
#define pb push_back
#define mk make_pair
#define mod 1000000007
int gcd(int a,int b){
    if(b==0)
     return a;
    return gcd(b,a%b);
}
int main(){
  int n;
  cin>>n;
  vector<bool> prime(1000001,false);
  for(int i=2;i<=1000001;i++){
     if(prime[i]==false){
         for(int j=2*i;j<=1000001;j+=i){
             prime[j]=true;
         }
     }
  }
  vector<int> ans(n);
  int c=0,g=0;
  for(int i=0;i<n;i++){
         cin>>ans[i];
         g=gcd(g,arr[i]);
         if(prime[ans[i]]==false)
          c++;
      }  
   if(c==n){
      cout<<"pairwise coprime"<<endl;
    }
   else if(g==1)
      cout<<"setwise coprime"<<endl;
   else
      cout<<"not coprime"<<endl;
}
