#include <bits/stdc++.h>
using namespace std;
using ii = pair<int, int>;
using vi = vector<int>;
const int N = 1e6 + 5, MOD = 1e9 + 7, INF = 1e9 + 5;
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
struct Sieve {
  int n;
  vector<bool> prime;
  vector<int> primes;
  void init(int x) {
    n = x;
    prime.assign(n + 1, false);
    sieve();
  }
  void sieve() {
    int mx = 1e5;
    prime.assign(mx + 1, true);
    prime[0] = prime[1] = false;
    for (int i = 2; i * i <= mx; i++) {
      if (prime[i]) {
        for (int j = i * i; j <= mx; j += i) prime[j] = false;
      }
    }
    for (int i = 2; i <= n; i++)
      if (prime[i]) primes.push_back(i);
  }
};
signed main() {
  ios_base::sync_with_stdio(false), cin.tie(nullptr);
  int n;
  cin >> n;
  int a[n];
  vi present(N, false);
  vi final;
  bool pairwise = true, setwise = true;
  int mx = 0;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    mx = max(mx, a[i]);
  }
  Sieve s1;
  s1.init(mx);
  int ans = gcd(a[0], a[1]);
  for (int i = 2; i < n; i++) ans = gcd(ans, a[i]);
  int cnt = 0;
  for (int i = 0; i < n; i++) {
    if (!s1.prime[a[i]]) cnt++;
  }
  if (ans != 1) setwise = false;
  if (cnt >= 2) pairwise = false;
  if (pairwise)
    cout << "pairwise coprime";
  else if (setwise)
    cout << "setwise coprime";
  else
    cout << "not coprime";
}
