#include <bits/stdc++.h>
using namespace std;
// int64_tは9*10^18まで、intは2*10^9まで

#define MAX_N 1000002

int prime[MAX_N];         // i番目の素数
bool is_prime[MAX_N + 1]; // is_prime[i]がtrueならiは素数

int sieve(int n) { // n以下の素数の数を返す
  int p = 0;
  for (int i = 0; i <= n; i++)
    is_prime[i] = true;
  is_prime[0] = is_prime[1] = false;
  for (int i = 2; i <= n; i++) {
    if (is_prime[i]) {
      prime[p++] = i;
      for (int j = 2 * i; j <= n; j += i)
        is_prime[j] = false;
    }
  }
  return p;
}

int main() {
  int n, flaga=0;
  set<int> s;
  cin >> n;
  int p = sieve(3000);
  int b[p] = {0}, c[p] = {0}, a[n];
  for (int i = 0; i < n; i++)
    cin >> a[i];
  sort(a, a + n);
  if(n==2){
    if(gcd(a[0], a[1])==1)
      cout << "pairwise coprime";
    else
      cout << "non coprime";
    return 0;
  }
  int flag = 0;
  for (int i = 1; i <n; i++) {
    if (a[i] == a[i - 1] && a[i]!=1)
      flag++;
  }
  if (flag > 0) {
    cout << "not coprime";
    return 0;
  }
  
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < p; j++) {
      if (a[i] % prime[j] == 0){
        while(a[i]%prime[j]==0){
          a[i]/=prime[j];
        }
        b[j]++;
      }
      else
        c[j]++;
    }
    if(a[i]!=1&&!s.count(a[i])){
      s.insert(a[i]);
    }
    else if(a[i]!=1){
      flaga++;
    }
  }
  int flagb = 0, flagc = 0;
  for (int i = 0; i < p; i++) {
    if (b[i] >= 2)
      flagb++;
    if (c[i] == 0)
      flagc++;
  }

  if(flaga>0&&flaga<n-1&&flagc==0){
    cout << "setwise coprime";
    return 0;
  }
  if(flaga>0){
    cout << "non coprime";
    return 0;
  }
  
  if (flagb == 0)
    cout << "pairwise coprime";
  else if (flagc == 0)
    cout << "setwise coprime";
  else
    cout << "not coprime";
  return 0;
}