#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;
long long GCD(long long a, long long b) { return b ? GCD(b, a % b) : a; }
long long num[1000005], cnt[1000005] = {0}, cnt2[1000005] = {0};
bool prime[1000005] = {0}, check = 0;
vector<long long> all;
int main() {
  long long i, j, n;
  scanf("%lld", &n);
  for (i = 0; i < n; i++) {
    scanf("%lld", &num[i]);
    cnt[num[i]]++;
    if (cnt[num[i]] > 1 && num[i] != 1) check = 1;
  }
  long long v = num[0];
  for (i = 1; i < n; i++) v = GCD(v, num[i]);
  for (i = 2; i <= 1000000; i++) {
    if (!prime[i]) {
      all.emplace_back(i);
      for (j = i * i; j <= 1000000; j += i) prime[j] = 1;
    }
  }
  all.emplace_back(100000000000LL);
  if (v == 1) {
    if (check) {
      puts("setwise coprime");
      return 0;
    }
    for (i = 0; i < n && !check; i++) {
      for (auto x : all) {
        if (x * x > num[i]) break;
        if (num[i] % x == 0) cnt2[x]++;
        if (cnt2[x] >= 2) check = 1;
      }
      long long id = lower_bound(all.begin(), all.end(), num[i]) - all.begin();
      if (all[id] == num[i]) {
        cnt2[all[id]]++;
        if (cnt2[all[id]] >= 2) check = 1;
      }
    }
    if (check)
      puts("setwise coprime");
    else
      puts("pairwise coprime");
  } else
    puts("not coprime");
}
