#include <bits/stdc++.h>
using namespace std;
using ll = long long;
string p = "pairwise coprime";
string s = "setwise coprime";
string n = "not coprime";
int gcd(int a, int b) {
  if (a % b == 0) {
    return b;
  } else {
    return gcd(b, a % b);
  }
}
int gcd_arr(vector<int> &a) {
  int n = a.size();
  for (int i = n - 2; i >= 0; i--) {
    a[i] = gcd(a[i], a[i + 1]);
  }
  return a.front();
}
map<long long int, long long int> prime_factor(long long int n) {
  map<long long int, long long int> ret;
  for (long long int i = 2; i * i <= n; i++) {
    while (n % i == 0) {
      ret[i]++;
      n /= i;
    }
  }
  if (n != 1) ret[n] = 1;
  return ret;
}
int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  map<int, int> prime;
  for (int i = 0; i < N; i++) {
    cin >> A[i];
    map<ll, ll> tmp = prime_factor(A[i]);
    for (auto tm : tmp) {
      prime[tm.first] += 1;
    }
  }
  if (gcd_arr(A) != 1) {
    cout << n << endl;
    return 0;
  }
  for (auto pr : prime) {
    if (pr.second != 1) {
      cout << s << endl;
      return 0;
    }
  }
  cout << p << endl;
  return 0;
}
