#include <bits/stdc++.h>
using namespace std;
bool prime[10000001];
void SieveOfEratosthenes() {
  memset(prime, true, sizeof(prime));
  for (long long int p = 2; p * p <= 10000000; p++) {
    if (prime[p] == true) {
      for (long long int i = p * p; i <= 10000000; i += p) {
        prime[i] = false;
      }
    }
  }
}
long long int binpow(long long int a, long long int b) {
  long long int res = 1;
  while (b > 0) {
    if (b & 1) res = (res * a);
    a = (a * a);
    b >>= 1;
  }
  return res;
}
long long int gcd(long long int a, long long int b) {
  if (b % a == 0) return a;
  return gcd(b % a, a);
}
long long int nCrModpDP(long long int n, long long int r, long long int p) {
  long long int C[r + 1];
  memset(C, 0, sizeof(C));
  C[0] = 1;
  for (long long int i = 1; i <= n; i++) {
    for (long long int j = min(i, r); j > 0; j--) C[j] = (C[j] + C[j - 1]) % p;
  }
  return C[r];
}
long long int nCrModp(long long int n, long long int r, long long int p) {
  if (r == 0) return 1;
  long long int ni = n % p, ri = r % p;
  return (nCrModp(n / p, r / p, p) * nCrModpDP(ni, ri, p)) % p;
}
vector<long long int> g[1000005];
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  long long int j, i, n, t, l, r, c, h, k, m, maxi, d, x;
  cin >> n;
  long long int a[n];
  SieveOfEratosthenes();
  for (j = 0; j < n; j++) {
    cin >> a[j];
  }
  vector<long long int> p, np;
  for (j = 1; j <= 1000001; j++) {
    if (prime[j]) p.push_back(j);
  }
  for (j = 1; j < p.size(); j++) {
    for (i = 0; i < n; i++) {
      if (a[i] % p[j] == 0) {
        g[p[j]].push_back(i);
      }
    }
  }
  long long int co = 1, second = 1;
  for (i = 0; i < p.size(); i++) {
    if (g[p[i]].size() >= 2) {
      co = -1;
    }
    if (g[p[i]].size() == n) {
      second = -1;
    }
  }
  if (co == 1)
    cout << "pairwise coprime";
  else if (second == 1)
    cout << "setwise coprime";
  else
    cout << "not coprime";
}
