#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;
const long long INF = 1e18 + 18;
const long long MAX = 200000;
const long long MOD = 1000000007;
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  long long N;
  cin >> N;
  vector<long long> A(N);
  long long mi = 0;
  for (long long i = (0); i < (N); i++) {
    cin >> A[i];
    if (i == 0) {
      mi = A[0];
      continue;
    }
    mi = gcd(mi, A[i]);
  }
  if (mi > 1) {
    cout << "not coprime" << endl;
    return 0;
  }
  map<long long, long long> M;
  for (long long i = (0); i < (N); i++) {
    long long dub = pow(A[i], 0.5);
    for (long long j = 2; j <= dub; j++) {
      if (A[i] % (j) == 0) {
        M[j]++;
        while (A[i] % (j) == 0) {
          A[i] /= (j);
        }
        if (A[i] == 1) break;
      }
    }
    if (A[i] != 1) {
      M[A[i]]++;
    }
  }
  long long MAX = 0;
  for (long long i = (0); i < (1000010); i++) {
    MAX = max(MAX, M[i]);
  }
  if (MAX <= 1) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  if (MAX < N) {
    cout << "setwise coprime" << endl;
    return 0;
  }
  cout << "not coprime" << endl;
}
