#include <bits/stdc++.h>
using namespace std;
long long int gcd(long long int a, long long int b) {
  b %= a;
  if (b == 0)
    return a;
  else
    gcd(b, a);
}
void solve() {
  int n, m;
  scanf("%d", &n);
  vector<int> A(n);
  vector<int> N;
  for (int i = 0; i < n; i++) {
    scanf("%d", &A[i]);
  }
  sort((A).begin(), (A).end());
  ;
  int tmp = A[0];
  for (int i = 1; i < n; i++) {
    tmp = gcd(tmp, A[i]);
  }
  if (tmp != 1) goto no_coprime;
  for (int i = 0; i < n - 1; i++) {
    for (int j = i + 1; j < n; j++) {
      int tmp = gcd(A[i], A[j]);
      if (tmp != 1) goto setwise;
    }
  }
  printf("pairwise coprime\n");
  return;
setwise:
  printf("setwise coprime\n");
  return;
no_coprime:
  printf("not coprime\n");
  return;
}
int main() {
  solve();
  return 0;
}
