#include <bits/stdc++.h>
using ll = long long;
ll n;
const ll MAX = 1000000;
std::vector<ll> table(MAX + 1, 1);
long long gcd(long long a, long long b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
void initTable() {
  table[0] = 0;
  table[1] = 0;
  for (ll i = 2; i * i <= MAX; i++) {
    if (table[i]) {
      table[i] = i;
      for (ll j = i * i; j <= MAX; j += i) {
        table[j] = i;
      }
    }
  }
}
int main() {
  initTable();
  std::vector<ll> cnt(MAX + 1, 0);
  ll maxCnt = 0;
  std::cin >> n;
  std::vector<ll> a(n);
  std::cin >> a[0];
  ll g = a[0];
  while (table[a[0]] > 1) {
    ll d = table[a[0]];
    while (a[0] % d == 0) {
      a[0] /= d;
    }
    cnt[d]++;
  }
  for (int i = 1; i < n; i++) {
    std::cin >> a[i];
    g = gcd(g, a[i]);
    while (table[a[i]] > 1) {
      ll d = table[a[i]];
      while (a[i] % d == 1) {
        a[i] /= d;
      }
      cnt[d]++;
      maxCnt = std::max(maxCnt, cnt[d]);
    }
  }
  if (maxCnt >= 2 && g > 1) {
    std::cout << "not coprime" << std::endl;
  } else if (maxCnt >= 2 && g == 1) {
    std::cout << "setwise coprime" << std::endl;
  } else {
    std::cout << "pairwise coprime" << std::endl;
  }
  return 0;
}
