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

int main() {
  int n;
  cin>>n;
  int a[n];
  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) goto loop;
    }
  }
  cout<<"pairwise coprime"<<endl;
  return 0;
  loop:
  int ans=a[0];
  for (int i=1;i<n;i++){
    ans=gcd(ans,a[i]);
    if (ans==1) {
      cout<<"setwise coprime"<<endl;
      return 0;
    }
  }
  cout<<"not coprime"<<endl;
  return 0;
}