#include <bits/stdc++.h>
typedef struct pair {
  int var;
  int num;
} pair;
long gcd(int a, int b) {
  if (a > b) {
    int tmp = a;
    a = b;
    b = tmp;
  }
  int r = b % a;
  while (r) {
    b = a;
    a = r;
    r = b % a;
  }
  return a;
}
int main(int argv, char* argc[]) {
  int n;
  scanf("%d", &n);
  long a[n];
  for (int i = 0; i < n; i++) {
    scanf("%ld", &a[i]);
  }
  unsigned sq_num = (int)sqrt((double)1000000);
  pair prime[1000000 + 2];
  for (int i = 0; i <= 1000000; i++) {
    prime[i].var = 1;
    prime[i].num = 0;
    prime[0].var = 0;
    prime[1].var = 0;
  }
  for (long long i = 1; i <= sq_num; i++) {
    if (prime[i].var == 1) {
      for (long long j = i + 1; i * j <= 1000000; j++) {
        prime[i * j].var = 0;
      }
    }
  }
  int flag = 0;
  long g = a[0];
  for (int i = 0; i < n; i++) {
    if (prime[a[i]].var == 0) {
      flag = 1;
    } else {
      if (prime[a[i]].num > 0) {
        flag = 1;
      }
      prime[a[i]].num++;
    }
    g = gcd(g, a[i]);
  }
  if (flag == 1 && g == 1) {
    printf("setwise coprime");
    return 0;
  }
  if (flag == 0) {
    printf("pairwise coprime");
    return 0;
  }
  printf("not coprime");
  return 0;
}
