#include <bits/stdc++.h>
using namespace std;
long long int gcd(long long int a, long long int b) {
  if (a == 0 || b == 0) return max(a, b);
  long long int mi = min(a, b);
  long long int ma = max(a, b);
  long long int c = ma % mi;
  return gcd(mi, c);
}
long long int N;
long long int A[1000005];
bool soinsu[100005];
bool ispairwise = true;
void PrimeF(long long int N) {
  long long int M = N;
  for (long long int i = 2; i < sqrt(N) + 1; i++) {
    long long int cnt = 0;
    while (M % i == 0) {
      M /= i;
      cnt++;
    }
    if (cnt > 0) {
      if (soinsu[i]) {
        ispairwise = false;
        return;
      }
      soinsu[i] = true;
    }
  }
  if (M != 1) soinsu[M] = true;
  return;
}
signed main() {
  scanf("%lld", &N);
  long long int a, b;
  long long int maxA = 0;
  for (long long int i = 0; i < N; i++) {
    scanf("%lld\n", &A[i]);
    maxA = max(A[i], maxA);
    b = A[i];
    if (i == 0) a = A[i];
    a = gcd(a, b);
  }
  for (long long int i = 0; i < maxA + 1; i++) soinsu[i] = false;
  for (long long int i = 0; i < N; i++) {
    PrimeF(A[i]);
  }
  if (ispairwise)
    printf("pairwise coprime\n");
  else {
    if (a == 1)
      printf("setwise coprime\n");
    else
      printf("not coprime\n");
  }
}
