#include <bits/stdc++.h>
using namespace std;
long long mod = 1e9 + 7;
long long MAXN = 1e6 + 1;
long long po(long long x, long long y, long long m) {
  if (y == 0) return 1;
  long long t = po(x, y / 2, m) % m;
  t = (t * t) % m;
  if (y & 1) return (t * x) % m;
  return t % m;
}
vector<bool> prime(MAXN, true);
unordered_map<long long, long long> m;
vector<long long> spf(MAXN);
long long gcd(long long a, long long b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
void sieve() {
  spf[1] = 1;
  for (long long i = 2; i < MAXN; i++) spf[i] = i;
  for (long long i = 4; i < MAXN; i += 2) spf[i] = 2;
  for (long long i = 3; i * i < MAXN; i++) {
    if (spf[i] == i) {
      for (long long j = i * i; j < MAXN; j += i)
        if (spf[j] == j) spf[j] = i;
    }
  }
}
void getFactorization(long long x) {
  while (x != 1) {
    m[(spf[x])]++;
    x = x / spf[x];
  }
}
void SieveOfEratosthenes() {
  for (long long p = 2; p * p <= MAXN; p++) {
    if (prime[p] == true) {
      for (long long i = p * p; i <= MAXN; i += p) prime[i] = false;
    }
  }
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  sieve();
  long long n;
  cin >> n;
  vector<long long> v(n);
  long long x;
  cin >> x;
  long long result = x;
  getFactorization(x);
  for (long long i = 1; i < n; ++i) {
    cin >> x;
    result = gcd(x, result);
    getFactorization(x);
  }
  long long count = 0;
  for (long long i = 2; i <= MAXN; ++i) {
    if (m[i] == 0) continue;
    if (m[i] == 1) ++count;
  }
  if (count >= 2)
    cout << "pairwise coprime"
         << "\n";
  else if (result == 1)
    cout << "setwise coprime"
         << "\n";
  else
    cout << "not coprime"
         << "\n";
  return 0;
}
