#include <bits/stdc++.h>
using namespace std;
long long gcd(long long x, long long y) {
  long long r;
  if (x < y) {
    swap(x, y);
  }
  while (y > 0) {
    r = x % y;
    x = y;
    y = r;
  }
  return x;
}
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() {
  long long n;
  cin >> n;
  long long a[n];
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
  }
  long long memo = a[0];
  for (long long i = 1; i < n; i++) {
    memo = gcd(memo, a[i]);
  }
  map<long long, long long> mp;
  for (long long i = 0; i < n; i++) {
    const auto &res = prime_factorize(a[i]);
    for (auto p : res) mp[p.first]++;
  }
  bool flag = true;
  for (auto p : mp) {
    if (p.second > 1) flag = false;
  }
  if (flag) {
    cout << "pairwise coprime" << endl;
  } else if (!flag && memo == 1) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
  return 0;
}
