#include<bits/stdc++.h>
using namespace std;

#define dbg(a)  cerr << __LINE__ << ": " << #a << " = " << a << '\n'

typedef long long ll;

const int N = 1e6+6;
int ache[N];
int cnt[N];

void fastin(int &n){
  char c = getchar();
  int neg = 0;
  while((c<48 && c!=45) || c>57)  c = getchar();
  if(c == 45) neg = 1, c=getchar();
  n = 0;
  while(c>=48 && c<=57) n=(n<<3)+(n<<1)+c-48, c=getchar();
  if(neg) n = -n;
  return ;
}


void pcpf(){
  for (int i = 2; i < N; ++i){
    if(cnt[i]==0){
      if(ache[i]) cnt[i]++;
      for (int j = 2*i; j < N; j+=i){
        if(ache[j]) cnt[i]++;
      }
    }
  }
}

int main(){
  ios::sync_with_stdio(0), cin.tie(0);
  
  int n;  fastin(n);
  int a[n];
  for (int i = 0; i < n; ++i){
    fastin(a[i]);
    ache[a[i]]++;
  }
  int gcd = a[0];
  for (int i = 1; i < n; ++i){
    gcd = __gcd(gcd, a[i]);
  }
  if(gcd!=1){
    cout << "not coprime" << endl;
    return 0;
  }
  pcpf();
  int sett = 0;
  for (int i = 0; i < N; ++i){
    if(ache[i]>1 or cnt[i]>1) sett = 1;
  }
  if(sett)  cout << "setwise coprime" << endl;
  else cout << "pairwise coprime" << endl;
  return 0;
}