#include<iostream>
#include<algorithm>
using namespace std;

int main(){
  int n;
  cin>>n;
  int a[n];
  int pwc=1,swc,nc;
  for(int i=0;i<n;i++)
    cin>>a[i];
  for(int i=0;i<n-1;i++){
    for(int j=i+1;j<n;j++){
      if(__gcd(a[i],a[j])!=1)
        pwc=0;
    }
  }
  int result = arr[0]; 
  for (int i = 1; i < n; i++) 
    result = __gcd(arr[i], result);
 if((result==1)&&pwc==0)
   swc=1;
  if(pwc==1)
    cout<<"pairwise coprime";
   else if(swc==1)
     cout<<"setwise coprime";
  else
    cout<<"not coprime";
  return 0;
}