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

int GCD(int n,int m){
  if(m==0){
    return n;
  }
  return GCD(m,n%m);
}

int main(){
  int N;
  cin >> N;
  vector<int> kos(1000005,0);
  vector<int> A(N);
  for(int i=0;i<N;i++){
    cin >> A[i];
    kos[A[i]]++;
  }
  int current=A[0];
  for(int i=1;i<N;i++){
    current=GCD(current,A[i]);
  }
  if(current>1){
    cout << "not coprime" << endl;
    return 0;
  }
  for(int i=2;i<=1000000;i++){
    int count=0;
    int now=i;
    while(now<=1000000){
      count+=kos[now];
      if(count>1){
        cout << "setwise coprime" << endl;
        return 0;
      }
      now+=i;
    }
  }
  cout << "pairwise coprime" << endl;
  return 0;
}