#include <bits/stdc++.h>
using namespace std;
template <class T, class U>
bool chmax(T &a, const U &b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T, class U>
bool chmin(T &a, const U &b) {
  if (b < a) {
    a = b;
    return 1;
  }
  return 0;
}
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
long long lcm(long long a, long long b) { return (a * b) / gcd(a, b); }
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};
vector<int> app(1000010, 0);
vector<bool> is_prime(1000010, true);
int main() {
  bool flag = false;
  long long ans = 0, sum = 0;
  int n;
  cin >> n;
  vector<int> a(n);
  vector<bool> isNOTcoprime(n, false);
  for (int i = 0, _i = (n); i < _i; ++i) {
    int ai;
    cin >> ai;
    a[i] = ai;
    app[ai]++;
  }
  long long g = gcd(a[0], a[1]);
  for (int a_ = (2), b_ = (n), i = a_; i < b_; ++i) {
    g = gcd(g, a[i]);
  }
  if (g != 1) {
    cout << "not coprime" << endl;
    return 0;
  }
  sort((a).begin(), (a).end());
  bool p_cop = true;
  vector<int> prime;
  for (int a_ = (2), b_ = (1001), i = a_; i < b_; ++i) {
    if (is_prime[i]) {
      prime.emplace_back(i);
      int p = i * 2;
      while (p <= 1000000) {
        is_prime[p] = false;
        p += i;
      }
    }
  }
  for (int pi : prime) {
    int cnt = 0;
    int p = pi;
    while (p <= 1000000) {
      if (app[p] != 0) ++cnt;
      p += pi;
    }
    if (cnt >= 2) p_cop = false;
    if (!p_cop) break;
  }
  if (p_cop) {
    cout << "pairwise coprime" << endl;
  } else {
    cout << "setwise coprime" << endl;
  }
  return 0;
}
