#include <bits/stdc++.h>
using namespace std;
long long gcd(long long p, long long q) {
  if (q == 0) {
    return p;
  }
  return gcd(q, p % q);
}
long long N, A[202020];
long long i, j, k;
int main() {
  scanf("%lld", &N);
  for (i = 0; i < N; ++i) {
    scanf("%lld", &A[i]);
  }
  j = A[0];
  for (i = 1; i < N; ++i) {
    j = gcd(j, A[i]);
  }
  if (j != 1) {
    printf("not coprime\n");
    return 0;
  }
  const long long Amx = 1010101;
  vector<long long> mk(Amx + 10), mk2(Amx + 10);
  for (i = 0; i < N; ++i) {
    ++mk2[A[i]];
  }
  for (i = 2; i < Amx; ++i) {
    if (mk[i]) {
      continue;
    }
    long long a = 0;
    for (j = i; j < Amx; j += i) {
      ++mk[j];
      a += mk2[j];
    }
    if (a >= 2) break;
  }
  if (i == Amx) {
    printf("pairwise coprime\n");
  } else {
    printf("setwise coprime\n");
  }
  return 0;
}
