#include <bits/stdc++.h>
const int MAXN = 1000000 + 7;
const int MAXLEN = MAXN / 2;
char isPrime[MAXN];
int Bucket[MAXLEN];
std::vector<int> primeList;
void init() {
  memset(isPrime, 1, sizeof(isPrime));
  int upbd = MAXN;
  for (int i = 2; i <= upbd; i++) {
    if (isPrime[i]) {
      primeList.push_back(i);
    }
    int primeCount = primeList.size();
    for (int j = 0; j < primeCount; j++) {
      if (i * primeList[j] > upbd) {
        break;
      }
      isPrime[i * primeList[j]] = 0;
      if (i % primeList[j] == 0) {
        break;
      }
    }
  }
}
void factor(int x) {
  for (int i = 0; primeList[i] <= x; i++) {
    if (x % primeList[i] == 0) {
      Bucket[i] += 1;
    }
  }
}
int main(void) {
  init();
  int N, x, maxx = 0;
  scanf("%d", &N);
  for (int i = 0; i < N; i++) {
    scanf("%d", &x);
    if (x > maxx) maxx = x;
    factor(x);
  }
  int count1 = 0;
  int countgt1 = 0;
  int ret = 0;
  for (int i = 0; primeList[i] <= maxx; i++) {
    if (Bucket[i] > 0) {
      if (Bucket[i] == 1) count1++;
      if (Bucket[i] > 1) countgt1++;
      if (Bucket[i] == N) {
        ret = 1;
      }
    }
  }
  if (count1 == N) {
    printf("pairwise coprime\n");
  } else if (ret == 1) {
    printf("not coprime\n");
  } else {
    printf("setwise coprime\n");
  }
  return 0;
}
