#include <bits/stdc++.h>
using namespace std;
const int MD = 1e9 + 7;
void dbg() { cerr << "\n"; }
template <class F, class... S>
void dbg(const F& f, const S&... s) {
  cerr << f << ": ";
  dbg(s...);
}
vector<int> pr;
void eratos(int n) {
  vector<bool> prime(n + 5);
  prime[2] = true;
  prime[0] = prime[1] = false;
  for (int i = 3; i <= n; i += 2) {
    prime[i] = true;
    prime[i + 1] = false;
  }
  int limit = (int)sqrt((double)n) + 1;
  for (int i = 3; i <= limit; i += 2)
    if (prime[i]) {
      for (int j = i * i; j <= n; j += i + i) prime[j] = false;
    }
  for (int i = 0; i < (n + 1); i++)
    if (prime[i]) pr.push_back(i);
}
long long gcd(long long x, long long y) { return y ? gcd(y, x % y) : x; }
int main() {
  cin.tie(0);
  ios_base::sync_with_stdio(false);
  int n;
  cin >> n;
  vector<long long> a(n);
  for (int i = 0; i < (n); i++) cin >> a[i];
  sort(a.begin(), a.end());
  eratos(a.back());
  int ok = 1;
  for (int i = 0; i < ((int)pr.size()); i++) {
    int ct = 0;
    for (int j = 0; j < (n); j++)
      if (a[j] % pr[i] == 0) ct++;
    if (ct > 1) {
      ok = 2;
      break;
    }
  }
  if (ok == 1) {
    puts("pairwise coprime");
    return 0;
  }
  long long g = a[0];
  for (int i = 0; i < (n); i++) g = gcd(g, a[i]);
  if (g == 1)
    puts("setwise coprime");
  else
    puts("not coprime");
  return 0;
}
