#include <bits/stdc++.h>
using namespace std;
vector<int> X(1000001);
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;
  vector<int> X;
  scanf("%d", &n);
  vector<int> A(n);
  for (int i = 0; i < n; i++) {
    scanf("%d", &A[i]);
    X[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) {
    printf("not coprime\n");
    return;
  }
  for (int i = 2; i < 1000001; i++) {
    int cnt = 0;
    for (int j = i; j < 1000001; j += i) {
      cnt += X[i];
    }
    if (cnt > 1) {
      printf("setwise coprime\n");
      return;
    }
  }
  printf("pairwise coprime\n");
  return;
}
int main() {
  solve();
  return 0;
}
