#include <bits/stdc++.h>
using namespace std;
int n;
long long a;
long long mul;
long long gcd(long long x, long long y) {
  if (x < y) {
    swap(x, y);
  }
  if (x % y == 0) {
    return y;
  }
  return gcd(y, x % y);
}
int main() {
  scanf("%d", &n);
  scanf("%lld", &a);
  long long Fgcd, Flcm;
  Fgcd = Flcm = mul = a;
  for (int i = 2; i <= n; i++) {
    scanf("%lld", &a);
    Fgcd = gcd(Fgcd, a);
    Flcm = Flcm / Fgcd * a;
    mul *= a;
  }
  if (Flcm == mul) {
    printf("pairwise coprime");
  } else if (Fgcd == 1) {
    printf("setwise coprime");
  } else {
    printf("not coprime");
  }
  return 0;
}
