#include <bits/stdc++.h>
using namespace std;
const long long int mod = 1e9 + 7;
ostream& operator<<(ostream& o, vector<long long int> s) {
  for (long long int i = 0; i < (long long int)s.size(); i++) o << s[i] << " ";
  o << "\n";
  return o;
}
long long int add(long long int a, long long int b) {
  long long int c = a + b;
  if (a > mod) a -= mod;
  return c;
}
void sub(long long int& a, long long int b) {
  a = a - b;
  if (a < 0) a += mod;
}
long long int mul(long long int a, long long int b) {
  return ((a % mod) * (b % mod)) % mod;
}
long long int exp(long long int a, long long int pow) {
  return (pow == 0 ? 1
                   : (pow & 1 ? mul(a, exp(mul(a, a), pow / 2))
                              : exp(mul(a, a), pow / 2)));
}
long long int gcd(long long int a, long long int b) {
  return b ? gcd(b, a % b) : a;
}
const long long int maxn = 2e6 + 5;
long long int factors[maxn];
void solve(long long int test) {
  long long int n;
  cin >> n;
  vector<long long int> v(n);
  long long int g = 0;
  for (long long int& x : v) cin >> x;
  for (long long int i = 0; i < n; i++) {
    for (long long int j = 2; j * j <= v[i]; j++) {
      if (v[i] % j == 0) {
        factors[j]++;
        if (j != v[i] / j) factors[v[i] % j]++;
      }
    }
    g = gcd(g, v[i]);
  }
  long long int ans = 0;
  for (long long int i = 2; i < maxn; i++) {
    if (factors[i] >= 2) {
      ans = 1;
      break;
    }
  }
  if (!ans) {
    cout << "pairwise coprime";
  } else if (g == 1) {
    cout << "setwise coprime";
  } else
    cout << "not coprime";
}
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long int t = 1;
  for (long long int i = 0; i < t; i++) solve(i + 1);
}
