#include <bits/stdc++.h>
using namespace std;
long long N;
long long A[1000010];
long long D[1000010];
long long mem[1000010];
bool f;
long long GCD(long long a, long long b) {
  if (a % b == 0) return b;
  return GCD(b, a % b);
}
signed main() {
  cin >> N;
  for (long long i = 0; i < N; i++) cin >> A[i];
  for (long long i = 2; i < 1000010; i++) {
    if (D[i] == 0) {
      for (long long j = 1; j * i < 1000010; j++) D[i * j] = i;
    }
  }
  D[1] = 1;
  for (long long i = 0; i < N; i++) {
    long long tmp = A[i];
    long long now;
    while (D[tmp] != tmp) {
      now = D[tmp];
      if (mem[now] && mem[now] != i + 1) f = true;
      mem[now] = i + 1;
      tmp = tmp / D[tmp];
    }
    now = D[tmp];
    if (mem[now] && mem[now] != i + 1) f = true;
    mem[now] = i + 1;
  }
  if (f) {
    long long gcd = GCD(A[0], A[1]);
    for (long long i = 0; i < N; i++) gcd = GCD(gcd, A[i]);
    if (gcd == 1) {
      cout << "setwise coprime" << endl;
    } else
      cout << "not coprime" << endl;
    return 0;
  }
  cout << "pairwise coprime" << endl;
  return 0;
}
