#include <bits/stdc++.h>
using namespace std;
bool flag[1000002];
int main() {
  int n, a, cnt;
  long long i, j;
  bool mark = false;
  scanf("%d", &n);
  for (i = 1; i <= n; i++) {
    scanf("%d", &a);
    flag[a] = true;
  }
  cnt = 0;
  for (i = 2; i < 1000001; i++) {
    a = 0;
    for (j = 1; i * j < 1000001; j++) a += flag[i * j];
    if (a > 1) mark = true;
    cnt = max(cnt, a);
  }
  if (!mark)
    printf("pairwise coprime\n");
  else if (cnt < n)
    printf("setwise coprime\n");
  else
    printf("not coprime\n");
  return 0;
}
