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