#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e6 + 6;
int vis[maxn];
int prim[maxn];
int cnt;
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
void Prim_table() {
  vis[1] = 1;
  for (int i = 2; i <= maxn; i++) {
    if (!vis[i]) {
      cnt++;
      prim[cnt] = i;
    }
    for (int j = 1; j <= cnt && (long long)i * prim[j] <= maxn; j++) {
      vis[prim[j] * i] = 1;
      if (i % prim[j] == 0) {
        break;
      }
    }
  }
}
int A[maxn];
int N;
int if_set, if_pair;
int main() {
  Prim_table();
  scanf("%d", &N);
  for (int i = 1; i <= N; i++) {
    scanf("%d", &A[i]);
  }
  if_set = if_pair = 1;
  for (int i = 1; i <= N && if_pair; i++) {
    for (int j = 1; (long long)prim[j] * prim[j] <= A[i] && j <= cnt; j++) {
      if (A[i] % prim[j] == 0) {
        if (vis[prim[j]]) {
          if_pair = 0;
          break;
        }
        vis[prim[j]] = 1;
      }
    }
  }
  int tmp = A[1];
  for (int i = 2; i <= N; i++) {
    tmp = gcd(A[i], tmp);
  }
  if (tmp != 1) if_set = 0;
  if (if_pair) {
    printf("pairwise coprime\n");
  } else {
    if (if_set) {
      printf("setwise coprime\n");
    } else {
      printf("not coprime\n");
    }
  }
  return 0;
}
