#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1000000;
int A[MAXN + 5];
int G[MAXN + 5];
int gcd(int a, int b) { return b == 0 ? a : gcd(b, a % b); }
int main() {
  int n, x;
  int cur = 0;
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) {
    scanf("%d", &x);
    ++A[x];
    cur = gcd(cur, x);
  }
  for (int i = 2; i <= MAXN; ++i) {
    for (int j = i; j <= MAXN; j += i) {
      if (A[j] != 0) ++G[i];
    }
  }
  int flag = 0;
  for (int i = 2; i <= MAXN; ++i) {
    if (G[i] > 1) {
      flag = 1;
      break;
    }
  }
  if (flag == 0)
    printf("pairwise coprime");
  else if (flag == 1 && cur == 1)
    printf("setwise coprime");
  else
    printf("not coprime");
  return 0;
}
