#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
using ll = long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
unsigned long long gcd(unsigned long long a, unsigned long long b) {
  return b ? gcd(b, a % b) : a;
}
unsigned long long lcm(unsigned long long a, unsigned long long b) {
  return a / gcd(a, b) * b;
}
vector<int> sieve(int n) {
  vector<int> res(n);
  iota((res).begin(), (res).end(), 0);
  for (int i = 2; i * i < n; ++i) {
    if (res[i] < i) continue;
    for (int j = i * i; j < n; j += i)
      if (res[j] == j) res[j] = i;
  }
  return res;
}
void func(long long N, std::vector<long long> A) {
  ll g = A[0];
  for (int i = 0, i_len = (N); i < i_len; i++) g = gcd(g, A[i]);
  if (g > 1) {
    cout << "not coprime" << endl;
    return;
  }
  vector<int> d(N + 1);
  d = sieve(*max_element((A).begin(), (A).end()) + 1);
  map<ll, ll> m;
  for (ll a : A) {
    while (a > 1) {
      a /= d[a];
      m[d[a]]++;
    }
  }
  for (auto iter = m.begin(); iter != m.end(); iter++) {
    if (iter->first > 1 && iter->second > 1) {
      cout << "setwise coprime" << endl;
      return;
    }
  }
  cout << "pairwise coprime" << endl;
}
int main() {
  long long N;
  scanf("%lld", &N);
  std::vector<long long> A(N);
  for (int i = 0; i < N; i++) {
    scanf("%lld", &A[i]);
  }
  func(N, std::move(A));
  return 0;
}
