#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int num[1000010];
int main(){
  int n;
  cin>>n;
  vector<int>a(n);

  rep(i,n){
    int x;
    cin>>x;
    a[i]=x;
    num[x]++;
  }
  sort(a.begin(),a.end());
  rep(i,n){
    for(int j=2;j<n/a[i]+1;j++){
      if(a[i]*j>1000010)break;
      num[a[i]*j]=0;
    }
  }
  int sum=0;
  rep(i,1000010)sum+=num[i];
  if(sum==0)cout<<"pairwise coprime"<<endl;
  else if()cout<<"setwise coprime"<<endl;
  else cout<<"not coprime"<<endl;
  return 0;
}