#include <bits/stdc++.h>
using namespace std;
int vet[100100], dividers[100100];
void div(int x) {
  int i;
  for (i = 2; i * i < x; i++)
    if (x % i == 0) {
      dividers[i]++;
      dividers[x / i]++;
    }
  if (x % i == 0) dividers[i]++;
}
int gcd(int a, int b) {
  while (a) {
    int aux = a;
    a = b % a;
    b = aux;
  }
  return b;
}
int main() {
  int n, g;
  scanf(" %d", &n);
  scanf(" %d", vet);
  g = vet[0];
  div(g);
  for (int i = 1; i < n; i++)
    scanf(" %d", vet + i), g = gcd(vet[i], g), div(vet[i]);
  if (g != 1) {
    printf("not coprime\n");
    return 0;
  }
  for (int i = 2; i <= 100; i++) {
    if (dividers[i] > 1) {
      printf("setwise coprime\n");
      return 0;
    }
  }
  printf("pairwise coprime\n");
  return 0;
}
