#include <bits/stdc++.h>
using namespace std;
std::vector<long long> Eratosthenes(long long N) {
  std::vector<bool> is_prime(N + 1);
  for (int i = 0; i <= N; i++) {
    is_prime[i] = true;
  }
  std::vector<long long> P;
  for (int i = 2; i <= N; i++) {
    if (is_prime[i]) {
      for (int j = 2 * i; j <= N; j += i) {
        is_prime[j] = false;
      }
      P.emplace_back(i);
    }
  }
  return P;
}
long long gcd(long long a, long long b) {
  long long r;
  while (r = a % b) {
    a = b;
    b = r;
  }
  return b;
}
int main() {
  int M = 1001001;
  vector<long long> sosu;
  sosu = Eratosthenes(M);
  int N;
  cin >> N;
  vector<long long> A(N);
  for (int i = 0; i < (N); ++i) cin >> A[i];
  map<long long, int> mp;
  bool flg = false;
  for (int i = 0; i < (N); ++i) {
    if (flg) break;
    if (A[i] == 1) continue;
    if (binary_search(sosu.begin(), sosu.end(), A[i])) {
      if (mp[A[i]] > 0) {
        flg = true;
        break;
      }
      mp[A[i]] = 1;
    } else {
      for (int j = 0; sosu[j] * sosu[j] <= A[i]; j++) {
        if (A[i] % sosu[j] == 0) {
          if (mp[sosu[j]] > 0) {
            flg = true;
            break;
          }
          mp[sosu[j]] = 1;
        }
      }
    }
  }
  if (!flg) {
    cout << "pairwise coprime" << endl;
  } else {
    long long tm = A[0];
    for (int i = 0; i < (N); ++i) {
      tm = gcd(tm, A[i]);
    }
    if (tm == 1) {
      cout << "setwise coprime" << endl;
    } else {
      cout << "not coprime" << endl;
    }
  }
  return 0;
}
