#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
long long gcd(long long a, long long b) {
  long long t;
  while (b) {
    t = b;
    b = a % b;
    a = t;
  }
  return a;
}
long long inv(long long a, long long m) {
  long long m0 = m;
  long long y = 0, x = 1;
  if (m == 1) return 0;
  while (a > 1) {
    long long q = a / m;
    long long t = m;
    m = a % m, a = t;
    t = y;
    y = x - q * y;
    x = t;
  }
  if (x < 0) x += m0;
  return x;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long n;
  cin >> n;
  vector<long long> a(n, 0);
  for (long long i = 0; i < n; i++) cin >> a[i];
  long long g = a[0];
  for (long long i = 1; i < n; i++) {
    if (g < a[i])
      g = gcd(a[i], g);
    else
      g = gcd(g, a[i]);
  }
  if (g > 1)
    cout << "not coprime\n";
  else {
    long long prod = 1;
    for (long long i = 0; i < n; i++) prod = (prod * 1ll * a[i]) % MOD;
    long long lcm = a[0];
    for (long long i = 0; i < n; i++) {
      if (lcm < a[i])
        lcm =
            (((lcm * 1ll * a[i]) % MOD) * 1ll * inv(gcd(a[i], lcm), MOD)) % MOD;
      else
        lcm =
            (((lcm * 1ll * a[i]) % MOD) * 1ll * inv(gcd(lcm, a[i]), MOD)) % MOD;
    }
    if (prod != lcm)
      cout << "pairwise coprime";
    else
      cout << "setwise coprime";
  }
  return 0;
}
