#include <bits/stdc++.h>
using namespace std;
const double EPS = 1e-10;
const int INF = 1e9;
const long long LINF = 1e15;
const int MOD = 1e9 + 7;
const double PI = acos(-1);
int dx[4] = {0, 1, 0, -1};
int dy[4] = {1, 0, -1, 0};
bool is_prime(long long N) {
  if (N == 1) return false;
  for (long long i = 2; i * i <= N; ++i) {
    if (N % i == 0) return false;
  }
  return true;
}
vector<pair<long long, long long> > prime_factorize(long long N) {
  vector<pair<long long, long long> > res;
  for (long long a = 2; a * a <= N; ++a) {
    if (N % a != 0) continue;
    long long ex = 0;
    while (N % a == 0) {
      ++ex;
      N /= a;
    }
    res.push_back({a, ex});
  }
  if (N != 1) res.push_back({N, 1});
  return res;
}
int main() {
  int N;
  cin >> N;
  vector<long long> A(N);
  for (int i = 0; i < N; i++) cin >> A[i];
  set<long long> st;
  bool flag1 = false;
  bool flag2 = false;
  long long g = A[0];
  map<long long, long long> mp;
  for (int i = 0; i < N; i++) {
    if (is_prime(A[i]))
      mp[A[i]]++;
    else {
      for (auto it : prime_factorize(A[i])) {
        mp[it.first]++;
      }
    }
  }
  for (auto it : mp) {
    if (it.second == N) flag1 = true;
    if (it.second == 1) flag2 = true;
  }
  if (!flag1 && flag2) {
    cout << "pairwise coprime" << endl;
  } else if (!flag1) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
}
