#include <bits/stdc++.h>
using namespace std;
long long n, a[1000005];
long long gcd(long long a, long long b) {
  if (!b)
    return a;
  else
    return gcd(b, a % b);
}
bool set_coprime = 0, pair_coprime = 1;
long long cnt[1000005];
signed main() {
  ios_base::sync_with_stdio(0);
  cin >> n;
  for (long long i = 0; i < n; i++) cin >> a[i];
  long long res = a[0];
  for (long long i = 1; i < n; i++) res = gcd(res, a[i]);
  if (res == 1) set_coprime = 1;
  for (long long i = 0; i < n; i++) {
    cnt[a[i]]++;
    for (long long j = 2; j * j <= a[i]; j++) {
      if (a[i] % j == 0) {
        cnt[j]++, cnt[a[i] / j]++;
        if (j * j == a[i]) cnt[j]--;
      }
    }
  }
  for (long long i = 2; i <= 1e6; i++)
    if (cnt[i] > 1) pair_coprime = 0;
  if (pair_coprime)
    cout << "pairwise coprime";
  else
    cout << (set_coprime ? "set coprime" : "not coprime");
  return 0;
}
