#include <bits/stdc++.h>
struct Vector {
  int size, lastptr, *array;
};
void init(struct Vector* vector, int n) {
  vector->array = (int*)calloc(n, sizeof(int));
  vector->size = n;
  vector->lastptr = 0;
  assert(vector->array && "init broken");
}
void resize(struct Vector* vector) {
  vector->array = (int*)realloc(vector->array, 2 * vector->size);
  vector->size *= 2;
}
void push_back(struct Vector* vector, int a) {
  if (vector->lastptr == vector->size) {
    resize(vector);
    push_back(vector, a);
  } else {
    vector->array[vector->lastptr++] = a;
  }
}
int gcd(int a, int b) {
  if (b == 0) {
    return a;
  }
  return gcd(b, a % b);
}
bool pairwise = true, setwise = false;
int pot[1000001], N, arr[1000000];
bool vis[1000001];
bool chk[1000001];
void sieve() {
  int i, j;
  pot[0] = 1;
  pot[1] = 1;
  for (i = 2; i <= 1000000; i += 2) {
    pot[i] = 2;
  }
  for (i = 3; i <= 1000000; i += 2) {
    if (!pot[i]) {
      for (j = 1; i * j <= 1000000; j++) {
        if (!pot[i * j]) {
          pot[i * j] = i;
        }
      }
    }
  }
}
int main(void) {
  sieve();
  scanf("%d", &N);
  int i;
  for (i = 0; i < N; ++i) {
    scanf("%d", arr + i);
  }
  int pairgcd = gcd(arr[0], arr[1]);
  for (i = 2; i < N; i++) {
    pairgcd = gcd(pairgcd, arr[i]);
  }
  if (pairgcd == 1) setwise = true;
  std::unordered_set<int> st[N];
  for (i = 0; i < N; i++) {
    int x = *(arr + i);
    memset(chk, false, sizeof(chk));
    while (x > 1) {
      st[i].insert(pot[x]);
      x /= pot[x];
    }
    int j = 0;
    for (int num : st[i]) {
      if (vis[num]) {
        pairwise = false;
      }
      vis[num] = true;
    }
  }
  if (pairwise) {
    printf("pairwise coprime\n");
  } else if (setwise) {
    printf("setwise coprime\n");
  } else {
    printf("not coprime\n");
  }
  return 0;
}
