#include <bits/stdc++.h>
using namespace std;
int s[1000001];
bool b[1000001], ono;
int gcd(int x, int y) {
  while (y) y ^= x ^= y ^= x %= y;
  return x;
}
int main() {
  for (int i = 2; i <= 1000000; i++) {
    if (s[i] == 0) {
      for (int j = i * 2; j <= 1000000; j += i) {
        s[j] = i;
      }
    }
  }
  int n, a, g;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%d", &a);
    if (i == 0)
      g = a;
    else
      g = gcd(g, a);
    set<int> se;
    while (s[a] != 0) {
      se.emplace(s[a]);
      a /= s[a];
    }
    se.emplace(a);
    for (int e : se) {
      if (b[e]) ono = true;
      b[e] = true;
    }
  }
  if (!ono) {
    printf("pairwise coprime\n");
  } else if (g == 1) {
    printf("setwise coprime\n");
  } else {
    printf("not coprime\n");
  }
}
