#include <bits/stdc++.h>
using ll = long long;
ll n;
const ll MAX = 1000000;
std::vector<bool> table(MAX + 1, true);
std::vector<ll> fact;
long long gcd(long long a, long long b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
void initTable() {
  table[0] = false;
  table[1] = false;
  for (ll i = 2; i * i <= MAX; i++) {
    if (table[i]) {
      fact.push_back(i);
      for (ll j = i * i; j <= MAX; j += i) {
        table[j] = false;
      }
    }
  }
}
std::vector<std::pair<long long, long long> > prime_factorize(long long N) {
  std::vector<std::pair<long long, long long> > res;
  for (long long a = 2; a * a <= N; ++a) {
    if (N % a != 0) continue;
    long long ex = 0;
    while (N % a == 0) {
      ++ex;
      N /= a;
    }
    res.push_back({a, ex});
  }
  if (N != 1) res.push_back({N, 1});
  return res;
}
int main() {
  std::cin >> n;
  std::vector<ll> a(n);
  std::cin >> a[0];
  std::map<ll, ll> mp;
  ll g = a[0];
  ll maxCnt = 0;
  ll k = fact.size();
  auto ff = prime_factorize(a[0]);
  for (auto p : ff) {
    mp[p.first]++;
    maxCnt = std::max(maxCnt, mp[p.first]);
  }
  for (int i = 1; i < n; i++) {
    std::cin >> a[i];
    g = gcd(g, a[i]);
    auto ff = prime_factorize(a[i]);
    for (auto p : ff) {
      mp[p.first]++;
      maxCnt = std::max(maxCnt, mp[p.first]);
    }
  }
  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;
}
