#include <bits/stdc++.h>
using namespace std;
long long A[1000000];
bool is_prime[1000001];
int divisor_count[1000];
int gcd(int m, int n) {
  if (n > m) {
    return gcd(n, m);
  } else if (n == 0) {
    return m;
  }
  return gcd(n, m % n);
}
int main() {
  int N;
  cin >> N;
  set<int> set_A;
  for (int i = 0; i < N; i++) {
    cin >> A[i];
    set_A.insert(A[i]);
  }
  for (int i = 2; i < 1000001; i++) {
    is_prime[i] = true;
  }
  for (int i = 2; i <= 1000; i++) {
    if (is_prime[i]) {
      for (int j = 2 * i; j < 1000001; j += i) {
        is_prime[j] = false;
      }
    }
  }
  vector<int> prime_lst;
  for (int i = 2; i <= 1000; i++) {
    if (is_prime[i]) {
      prime_lst.push_back(i);
    }
  }
  bool done = false;
  bool pair_co = true;
  set<int> left_A_set;
  for (int i = 0; i < N; i++) {
    int tmp = A[i];
    for (int j = 0; j < prime_lst.size(); j++) {
      if (A[i] % prime_lst[j] == 0) {
        divisor_count[j]++;
        if (divisor_count[j] > 1) {
          done = true;
          break;
        }
        while (tmp % prime_lst[j] == 0) {
          tmp /= prime_lst[j];
        }
      }
    }
    if (tmp != 1) {
      if (left_A_set.find(tmp) != left_A_set.end()) {
        pair_co = false;
        done = true;
      }
      left_A_set.insert(tmp);
    }
    if (done) {
      break;
    }
  }
  for (int i = 0; i < prime_lst.size(); i++) {
    if (divisor_count[i] >= 2) {
      pair_co = false;
      break;
    }
  }
  if (pair_co && set_A.size() == N) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  long long tmp = A[0];
  for (int i = 1; i < N; i++) {
    tmp = gcd(tmp, A[i]);
  }
  if (tmp == 1) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
  return 0;
}
