#include <bits/stdc++.h>
using namespace std;
const int sz = 1e6 + 1;
int cnt[sz], num[sz];
int gcd(int a, int b) { return b == 0 ? a : gcd(b, a % b); }
int main() {
  bool f = false;
  int N;
  scanf("%d", &N);
  for (int i = 1; i <= N; i++) {
    scanf("%d", &num[i]);
    int t = num[i], pre = 0, d = 2;
    while (t != 1) {
      if (t % d == 0) {
        t /= d;
        if (pre != d) {
          if (++cnt[d] > 1) f = true;
        }
        pre = d;
      } else
        d++;
    }
  }
  if (!f)
    printf("pairwise coprime");
  else {
    int g = num[1];
    for (int i = 2; i <= N; i++) g = gcd(g, num[i]);
    if (g == 1)
      printf("setwise coprime");
    else
      printf("not coprime");
  }
}
