#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 5;
int num[N];
int main() {
  int n, x, pc = 0, sc = 0, ok = 0, cnt;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) num[i] = 0;
  for (int j = 1; j <= n; j++) {
    scanf("%d", &x);
    for (int i = 2; i <= x / i; i++) {
      int p = 0;
      if (x % i == 0) num[i]++;
      while (x % i == 0) {
        x /= i;
      }
    }
    if (x > 1) num[x]++;
  }
  for (int i = 1; i <= n; i++) {
    if (num[i] > 1) ok = 1;
    cnt = max(cnt, num[i]);
  }
  if (ok == 0)
    printf("pairwise coprime\n");
  else if (cnt < n)
    printf("setwise coprime\n");
  else
    printf("not coprime\n");
  return 0;
}
